diff options
author | Christoph Hellwig <hch@lst.de> | 2023-05-23 10:40:20 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 13:59:29 +0200 |
commit | 25ac047c9d3df373de35ba4ee3f0c902874a1fab (patch) | |
tree | bcc647a2f0154e4a913db436d690edbcfa8a0870 /fs/btrfs/disk-io.c | |
parent | e91909aace336a182da20bcbe507995ac24f74bb (diff) | |
download | lwn-25ac047c9d3df373de35ba4ee3f0c902874a1fab.tar.gz lwn-25ac047c9d3df373de35ba4ee3f0c902874a1fab.zip |
btrfs: remove a pointless NULL check in btrfs_lookup_fs_root
btrfs_grab_root already checks for a NULL root itself.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c53c82cd0885..06dab9d018c2 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1157,8 +1157,7 @@ static struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info, spin_lock(&fs_info->fs_roots_radix_lock); root = radix_tree_lookup(&fs_info->fs_roots_radix, (unsigned long)root_id); - if (root) - root = btrfs_grab_root(root); + root = btrfs_grab_root(root); spin_unlock(&fs_info->fs_roots_radix_lock); return root; } |