fs: btrfs: simplify close_ctree_fs_info()
At the beginning of close_ctree_fs_info() the value 0 is assigned to err
and never changed before testing it.
Let's get rid of the superfluous variable.
Fixes: f06bfcf54d ("fs: btrfs: Crossport open_ctree_fs_info() from btrfs-progs")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Qu Wenruo <wqu@suse.com>
This commit is contained in:
committed by
Tom Rini
parent
9dba07f143
commit
3b00a6bafc
@@ -1030,7 +1030,6 @@ out:
|
|||||||
int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
|
int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int err = 0;
|
|
||||||
|
|
||||||
free_fs_roots_tree(&fs_info->fs_root_tree);
|
free_fs_roots_tree(&fs_info->fs_root_tree);
|
||||||
|
|
||||||
@@ -1038,9 +1037,7 @@ int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
|
|||||||
ret = btrfs_close_devices(fs_info->fs_devices);
|
ret = btrfs_close_devices(fs_info->fs_devices);
|
||||||
btrfs_cleanup_all_caches(fs_info);
|
btrfs_cleanup_all_caches(fs_info);
|
||||||
btrfs_free_fs_info(fs_info);
|
btrfs_free_fs_info(fs_info);
|
||||||
if (!err)
|
return ret;
|
||||||
err = ret;
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid)
|
int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid)
|
||||||
|
|||||||
Reference in New Issue
Block a user