ocfs2: clean up redundant function declarations
PATCH v2 1/1 ocfs2: clean up redundant function declarations
The function ocfs2_extend_allocation has been deleted, clean up its declaration.
--- fs/ocfs2/file.c | 6 +++--- fs/ocfs2/file.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-)
fs/ocfs2/file.c +3 -3
@@ -563,7 +563,7 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb,return ret; } -static int __ocfs2_extend_allocation (struct inode *inode,u32 logical_start, +static int ocfs2_extend_allocation (struct inode *inode,u32 logical_start,u32 clusters_to_add,int mark_unwritten) {int status =0 ;
@@ -1035,7 +1035,7 @@ int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, clusters_to_add -= oi->ip_clusters;if (clusters_to_add) { - ret =__ocfs2_extend_allocation (inode, oi->ip_clusters, + ret =ocfs2_extend_allocation (inode, oi->ip_clusters, clusters_to_add,0 );if (ret) {mlog_errno (ret);
@@ -1493,7 +1493,7 @@ static int ocfs2_allocate_unwritten_extents(struct inode *inode, goto next; } - ret =__ocfs2_extend_allocation (inode, cpos, alloc_size,1 ); + ret =ocfs2_extend_allocation (inode, cpos, alloc_size,1 );if (ret) {if (ret != -ENOSPC )mlog_errno (ret);
fs/ocfs2/file.h +0 -2
@@ -65,8 +65,6 @@ int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, u64 new_i_size, u64 zero_to);int ocfs2_zero_extend (struct inode *inode,struct buffer_head *di_bh,loff_t zero_to); -int ocfs2_extend_allocation (struct inode *inode,u32 logical_start, -u32 clusters_to_add,int mark_unwritten);int ocfs2_setattr (struct dentry *dentry,struct iattr *attr);int ocfs2_getattr (const struct path *path,struct kstat *stat,u32 request_mask,unsigned int flags);
PATCH v2 1/1 ocfs2: clean up redundant function declarations
Quoted 3 lines · Jia Guo
The function
ocfs2_extend_allocationhas been deleted, clean up its declaration.
Also change the static function name from __ocfs2_extend_allocation() to ocfs2_extend_allocation() to be consistent with the corresponding trace events as well as comments for ocfs2_lock_allocators().
Please add above to description as well.
Quoted 2 lines
Fixes 964f14a0d350 ("ocfs2: clean up some dead code")
Redundant blank line here.
Quoted 13 lines
Signed-off-by Jia Guo <[email protected]>Reviewed-by Jun Piao <[email protected]>--- fs/ocfs2/file.c | 6 +++--- fs/ocfs2/file.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-)fs/ocfs2/file.c +0
-0
fs/ocfs2/file.c int ocfs2_add_inode_data(struct ocfs2_super *osb, · line 567
Quoted 6 lines
fs/ocfs2/file.c +1
-1@@ -563,7 +563,7 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb,return ret; } -static int __ocfs2_extend_allocation (struct inode *inode,u32 logical_start, +static int ocfs2_extend_allocation (struct inode *inode,u32 logical_start,u32 clusters_to_add,int mark_unwritten)
Parameters should be aligned with '('.
For example:
static int ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
u32 clusters_to_add, int mark_unwritten)
fs/ocfs2/file.c int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, · line 1039
Quoted 9 lines
fs/ocfs2/file.c +1
-1{int status =0 ;@@ -1035,7 +1035,7 @@ int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, clusters_to_add -= oi->ip_clusters;if (clusters_to_add) { - ret =__ocfs2_extend_allocation (inode, oi->ip_clusters, + ret =ocfs2_extend_allocation (inode, oi->ip_clusters, clusters_to_add,0 );
Also here.
Quoted 17 lines
fs/ocfs2/file.c +1
-1if (ret) {mlog_errno (ret);@@ -1493,7 +1493,7 @@ static int ocfs2_allocate_unwritten_extents(struct inode *inode, goto next; } - ret =__ocfs2_extend_allocation (inode, cpos, alloc_size,1 ); + ret =ocfs2_extend_allocation (inode, cpos, alloc_size,1 );if (ret) {if (ret != -ENOSPC )mlog_errno (ret);fs/ocfs2/file.h +0
-0
fs/ocfs2/file.h int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, · line 70
Quoted 8 lines
fs/ocfs2/file.h +0
-2@@ -65,8 +65,6 @@ int ocfs2_extend_no_holes(struct inode *inode, struct buffer_head *di_bh, u64 new_i_size, u64 zero_to);int ocfs2_zero_extend (struct inode *inode,struct buffer_head *di_bh,loff_t zero_to); -int ocfs2_extend_allocation (struct inode *inode,u32 logical_start, -u32 clusters_to_add,int mark_unwritten);int ocfs2_setattr (struct dentry *dentry,struct iattr *attr);int ocfs2_getattr (const struct path *path,struct kstat *stat,u32 request_mask,unsigned int flags);
With above concern addressed,