Skip to content

Commit 255e7bc

Browse files
riteshharjanitytso
authored andcommitted
ext4: Make ext4_meta_trans_blocks() non-static for later use
Let's make ext4_meta_trans_blocks() non-static for use in later functions during ->end_io conversion for atomic writes. We will need this function to estimate journal credits for a special case. Instead of adding another wrapper around it, let's make this non-static. Reviewed-by: Ojaswin Mujoo <[email protected]> Acked-by: Darrick J. Wong <[email protected]> Signed-off-by: Ritesh Harjani (IBM) <[email protected]> Link: https://patch.msgid.link/23ce80d4286f792831ce99d13558182ee228fedb.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 1c972b1 commit 255e7bc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

fs/ext4/ext4.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,6 +3045,8 @@ extern void ext4_set_aops(struct inode *inode);
30453045
extern int ext4_writepage_trans_blocks(struct inode *);
30463046
extern int ext4_normal_submit_inode_data_buffers(struct jbd2_inode *jinode);
30473047
extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
3048+
extern int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
3049+
int pextents);
30483050
extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
30493051
loff_t lstart, loff_t lend);
30503052
extern vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf);

fs/ext4/inode.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ static inline int ext4_begin_ordered_truncate(struct inode *inode,
140140
new_size);
141141
}
142142

143-
static int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
144-
int pextents);
145-
146143
/*
147144
* Test whether an inode is a fast symlink.
148145
* A fast symlink has its symlink data stored in ext4_inode_info->i_data.
@@ -5856,8 +5853,7 @@ static int ext4_index_trans_blocks(struct inode *inode, int lblocks,
58565853
*
58575854
* Also account for superblock, inode, quota and xattr blocks
58585855
*/
5859-
static int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
5860-
int pextents)
5856+
int ext4_meta_trans_blocks(struct inode *inode, int lblocks, int pextents)
58615857
{
58625858
ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb);
58635859
int gdpblocks;

0 commit comments

Comments
 (0)