mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
ext4: make some functions static in extents.c
Make the following functions static since they're only used in extents.c: __ext4_ext_dirty() ext4_can_extents_be_merged() ext4_collapse_range() ext4_insert_range() Also remove the prototype for ext4_ext_writepage_trans_blocks(), as this function is not defined anywhere. Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20191231180444.46586-5-ebiggers@kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com> Reviewed-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
a1180994f5
commit
43f816772f
@ -3315,7 +3315,6 @@ struct ext4_extent;
|
||||
#define EXT_MAX_BLOCKS 0xffffffff
|
||||
|
||||
extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
|
||||
extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
|
||||
extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
|
||||
extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
|
||||
struct ext4_map_blocks *map, int flags);
|
||||
@ -3335,9 +3334,6 @@ extern int ext4_map_blocks(handle_t *handle, struct inode *inode,
|
||||
extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
|
||||
int num,
|
||||
struct ext4_ext_path *path);
|
||||
extern int ext4_can_extents_be_merged(struct inode *inode,
|
||||
struct ext4_extent *ex1,
|
||||
struct ext4_extent *ex2);
|
||||
extern int ext4_ext_insert_extent(handle_t *, struct inode *,
|
||||
struct ext4_ext_path **,
|
||||
struct ext4_extent *, int);
|
||||
@ -3353,8 +3349,6 @@ extern int ext4_get_es_cache(struct inode *inode,
|
||||
struct fiemap_extent_info *fieinfo,
|
||||
__u64 start, __u64 len);
|
||||
extern int ext4_ext_precache(struct inode *inode);
|
||||
extern int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len);
|
||||
extern int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len);
|
||||
extern int ext4_swap_extents(handle_t *handle, struct inode *inode1,
|
||||
struct inode *inode2, ext4_lblk_t lblk1,
|
||||
ext4_lblk_t lblk2, ext4_lblk_t count,
|
||||
|
@ -267,10 +267,5 @@ static inline void ext4_idx_store_pblock(struct ext4_extent_idx *ix,
|
||||
0xffff);
|
||||
}
|
||||
|
||||
#define ext4_ext_dirty(handle, inode, path) \
|
||||
__ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path))
|
||||
int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle,
|
||||
struct inode *inode, struct ext4_ext_path *path);
|
||||
|
||||
#endif /* _EXT4_EXTENTS */
|
||||
|
||||
|
@ -161,8 +161,9 @@ static int ext4_ext_get_access(handle_t *handle, struct inode *inode,
|
||||
* - ENOMEM
|
||||
* - EIO
|
||||
*/
|
||||
int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle,
|
||||
struct inode *inode, struct ext4_ext_path *path)
|
||||
static int __ext4_ext_dirty(const char *where, unsigned int line,
|
||||
handle_t *handle, struct inode *inode,
|
||||
struct ext4_ext_path *path)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -179,6 +180,9 @@ int __ext4_ext_dirty(const char *where, unsigned int line, handle_t *handle,
|
||||
return err;
|
||||
}
|
||||
|
||||
#define ext4_ext_dirty(handle, inode, path) \
|
||||
__ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path))
|
||||
|
||||
static ext4_fsblk_t ext4_ext_find_goal(struct inode *inode,
|
||||
struct ext4_ext_path *path,
|
||||
ext4_lblk_t block)
|
||||
@ -1696,9 +1700,9 @@ static int ext4_ext_correct_indexes(handle_t *handle, struct inode *inode,
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
ext4_can_extents_be_merged(struct inode *inode, struct ext4_extent *ex1,
|
||||
struct ext4_extent *ex2)
|
||||
static int ext4_can_extents_be_merged(struct inode *inode,
|
||||
struct ext4_extent *ex1,
|
||||
struct ext4_extent *ex2)
|
||||
{
|
||||
unsigned short ext1_ee_len, ext2_ee_len;
|
||||
|
||||
@ -4657,6 +4661,10 @@ retry:
|
||||
return ret > 0 ? ret2 : ret;
|
||||
}
|
||||
|
||||
static int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len);
|
||||
|
||||
static int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len);
|
||||
|
||||
static long ext4_zero_range(struct file *file, loff_t offset,
|
||||
loff_t len, int mode)
|
||||
{
|
||||
@ -5415,7 +5423,7 @@ out:
|
||||
* This implements the fallocate's collapse range functionality for ext4
|
||||
* Returns: 0 and non-zero on error.
|
||||
*/
|
||||
int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
|
||||
static int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
|
||||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
ext4_lblk_t punch_start, punch_stop;
|
||||
@ -5559,7 +5567,7 @@ out_mutex:
|
||||
* by len bytes.
|
||||
* Returns 0 on success, error otherwise.
|
||||
*/
|
||||
int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
|
||||
static int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
|
||||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
handle_t *handle;
|
||||
|
Loading…
Reference in New Issue
Block a user