From: Ritesh Harjani (IBM) Date: Thu, 15 May 2025 19:50:51 +0000 (+0530) Subject: ext4: Make ext4_meta_trans_blocks() non-static for later use X-Git-Tag: v6.16-rc1~139^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=255e7bc2127cbd3a718a55d2da5b2d3f015adcd7;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Darrick J. Wong Signed-off-by: Ritesh Harjani (IBM) Link: https://patch.msgid.link/23ce80d4286f792831ce99d13558182ee228fedb.1747337952.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index bc2deb5bfe77a..8fda9cdfc13da 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -3045,6 +3045,8 @@ extern void ext4_set_aops(struct inode *inode); extern int ext4_writepage_trans_blocks(struct inode *); extern int ext4_normal_submit_inode_data_buffers(struct jbd2_inode *jinode); extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); +extern int ext4_meta_trans_blocks(struct inode *inode, int lblocks, + int pextents); extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode, loff_t lstart, loff_t lend); extern vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf); diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 9f3b3db14eda5..72dc1314925fc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -140,9 +140,6 @@ static inline int ext4_begin_ordered_truncate(struct inode *inode, new_size); } -static int ext4_meta_trans_blocks(struct inode *inode, int lblocks, - int pextents); - /* * Test whether an inode is a fast symlink. * 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, * * Also account for superblock, inode, quota and xattr blocks */ -static int ext4_meta_trans_blocks(struct inode *inode, int lblocks, - int pextents) +int ext4_meta_trans_blocks(struct inode *inode, int lblocks, int pextents) { ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb); int gdpblocks;