btrfs:make close_ctree() return void
PATCH 1/1 btrfs:make close_ctree() return void
From: Wanlong Gao <[email protected]>
Make close_ctree() return void since it always return 0, and fix the return value of btrfs_put_super() to consistent with VFS.
Signed-off-by Wanlong Gao <[email protected]>
--- fs/btrfs/disk-io.c | 4 +--- fs/btrfs/disk-io.h | 2 +- fs/btrfs/super.c | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-)
fs/btrfs/disk-io.c +1 -3
@@ -2528,7 +2528,7 @@ int btrfs_commit_super(struct btrfs_root *root)return ret; } -int close_ctree (struct btrfs_root *root) +void close_ctree (struct btrfs_root *root) {struct btrfs_fs_info *fs_info = root->fs_info;int ret;
@@ -2630,8 +2630,6 @@ int close_ctree(struct btrfs_root *root)kfree (fs_info->dev_root);kfree (fs_info->csum_root);kfree (fs_info); - -return 0 ; }int btrfs_buffer_uptodate (struct extent_buffer *buf,u64 parent_transid)
fs/btrfs/disk-io.h +1 -1
@@ -47,7 +47,7 @@ int clean_tree_block(struct btrfs_trans_handle *trans,struct btrfs_root *open_ctree (struct super_block *sb,struct btrfs_fs_devices *fs_devices,char *options); -int close_ctree (struct btrfs_root *root); +void close_ctree (struct btrfs_root *root);int write_ctree_super (struct btrfs_trans_handle *trans,struct btrfs_root *root,int max_mirrors);struct buffer_head *btrfs_read_dev_super (struct block_device *bdev);
fs/btrfs/super.c +1 -4
@@ -146,12 +146,9 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,static void btrfs_put_super (struct super_block *sb) {struct btrfs_root *root =btrfs_sb (sb); -int ret; - ret =close_ctree (root); +close_ctree (root); sb->s_fs_info =NULL ; - - (void )ret;/* FIXME: need to fix VFS to return error? */ }enum {
Signature · 1 line
1.7.4.1
Quoted 5 lines · Wanlong Gao
From: Wanlong Gao <[email protected]>
Make
close_ctree()return void since it always return 0, and fix the return value ofbtrfs_put_super()to consistent with VFS.
I don't quite like this patch. We do have some failure cases in close_ctree(), but this doesn't fix that while have the FIXME tag removed.
--
Li Zefan