summaryrefslogtreecommitdiff
path: root/fs/ext2/ext2.h
diff options
context:
space:
mode:
authorGeorg Ottinger <g.ottinger@gmx.at>2023-08-17 22:59:25 +0300
committerJan Kara <jack@suse.cz>2023-08-18 13:54:54 +0300
commit2ebc736c8452f8ccf86f5398e8d8ceec283aa50d (patch)
treef5572d3d0072ae46e6dda83bcb3b7111fd120674 /fs/ext2/ext2.h
parent9bc6fc3304d89f19c028cb4a8d6af94f9e5faeb0 (diff)
downloadlinux-2ebc736c8452f8ccf86f5398e8d8ceec283aa50d.tar.xz
ext2: improve consistency of ext2_fsblk_t datatype usage
The ext2 block allocation/deallocation functions and their respective calls use a mixture of unsigned long and ext2_fsblk_t datatypes to index the desired ext2 block. This commit replaces occurrences of unsigned long with ext2_fsblk_t, covering the functions ext2_new_block(), ext2_new_blocks(), ext2_free_blocks(), ext2_free_data() and ext2_free_branches(). This commit is rather conservative, and only replaces unsigned long with ext2_fsblk_t if the variable is used to index a specific ext2 block. Signed-off-by: Georg Ottinger <g.ottinger@gmx.at> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230817195925.10268-1-g.ottinger@gmx.at>
Diffstat (limited to 'fs/ext2/ext2.h')
-rw-r--r--fs/ext2/ext2.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 26dbe579768c..7fdd685c384d 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -701,12 +701,11 @@ static inline struct ext2_inode_info *EXT2_I(struct inode *inode)
/* balloc.c */
extern int ext2_bg_has_super(struct super_block *sb, int group);
extern unsigned long ext2_bg_num_gdb(struct super_block *sb, int group);
-extern ext2_fsblk_t ext2_new_blocks(struct inode *, unsigned long,
+extern ext2_fsblk_t ext2_new_blocks(struct inode *, ext2_fsblk_t,
unsigned long *, int *, unsigned int);
extern int ext2_data_block_valid(struct ext2_sb_info *sbi, ext2_fsblk_t start_blk,
unsigned int count);
-extern void ext2_free_blocks (struct inode *, unsigned long,
- unsigned long);
+extern void ext2_free_blocks(struct inode *, ext2_fsblk_t, unsigned long);
extern unsigned long ext2_count_free_blocks (struct super_block *);
extern unsigned long ext2_count_dirs (struct super_block *);
extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb,