ext4: move __ext4_check_blockref to block_validity.c
In preparation for moving the indirect functions to a separate file, move __ext4_check_blockref() to block_validity.c and rename it to ext4_check_blockref() which is exported as globally visible function. Also, rename the cpp macro ext4_check_inode_blockref() to ext4_ind_check_inode(), to make it clear that it is only valid for use with non-extent mapped inodes. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@@ -2124,6 +2124,19 @@ static inline void ext4_mark_super_dirty(struct super_block *sb)
|
||||
sb->s_dirt =1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Block validity checking
|
||||
*/
|
||||
#define ext4_check_indirect_blockref(inode, bh) \
|
||||
ext4_check_blockref(__func__, __LINE__, inode, \
|
||||
(__le32 *)(bh)->b_data, \
|
||||
EXT4_ADDR_PER_BLOCK((inode)->i_sb))
|
||||
|
||||
#define ext4_ind_check_inode(inode) \
|
||||
ext4_check_blockref(__func__, __LINE__, inode, \
|
||||
EXT4_I(inode)->i_data, \
|
||||
EXT4_NDIR_BLOCKS)
|
||||
|
||||
/*
|
||||
* Inodes and files operations
|
||||
*/
|
||||
@@ -2153,6 +2166,8 @@ extern void ext4_exit_system_zone(void);
|
||||
extern int ext4_data_block_valid(struct ext4_sb_info *sbi,
|
||||
ext4_fsblk_t start_blk,
|
||||
unsigned int count);
|
||||
extern int ext4_check_blockref(const char *, unsigned int,
|
||||
struct inode *, __le32 *, unsigned int);
|
||||
|
||||
/* extents.c */
|
||||
extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
|
||||
|
Reference in New Issue
Block a user