]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: btrfs: simplify close_ctree_fs_info()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 25 Dec 2020 12:45:25 +0000 (13:45 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 20 Jan 2021 19:01:45 +0000 (14:01 -0500)
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>
fs/btrfs/disk-io.c

index 01e7cee52017402c252c5ff0123df0d17c5d8963..b332ecb796f93b2b2481c9edd707824256058a03 100644 (file)
@@ -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)