diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-12-25 13:45:25 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-20 14:01:45 -0500 |
commit | 3b00a6bafc726a9a9df45346fb734d9ecef7b428 (patch) | |
tree | a3fc49f05cbcff0860cb2c8b7692bdcab1b3b9e8 /fs/btrfs/disk-io.c | |
parent | 9dba07f14304612ed4ee6d827898aa0cb55d4e26 (diff) | |
download | u-boot-3b00a6bafc726a9a9df45346fb734d9ecef7b428.tar.gz u-boot-3b00a6bafc726a9a9df45346fb734d9ecef7b428.tar.xz u-boot-3b00a6bafc726a9a9df45346fb734d9ecef7b428.zip |
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: f06bfcf54d0e ("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>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 01e7cee520..b332ecb796 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1030,7 +1030,6 @@ out: int close_ctree_fs_info(struct btrfs_fs_info *fs_info) { int ret; - int err = 0; 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); btrfs_cleanup_all_caches(fs_info); btrfs_free_fs_info(fs_info); - if (!err) - err = ret; - return err; + return ret; } int btrfs_buffer_uptodate(struct extent_buffer *buf, u64 parent_transid) |