summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-05-13 15:53:35 +0200
committerJosef Bacik <jbacik@fusionio.com>2013-06-14 17:29:30 +0200
commit3c64a1aba7cfcb04f79e76f859b3d66660275d59 (patch)
treeb84ec1bcce88d60d5c3fd7a68d4dbcbdf985a6cb /fs/btrfs/super.c
parentBtrfs: cleanup, btrfs_read_fs_root_no_name() doesn't return NULL (diff)
downloadlinux-3c64a1aba7cfcb04f79e76f859b3d66660275d59.tar.xz
linux-3c64a1aba7cfcb04f79e76f859b3d66660275d59.zip
Btrfs: cleanup: don't check the same thing twice
btrfs_read_fs_root_no_name() already checks if btrfs_root_refs() is zero and returns ENOENT in this case. There is no need to do it again in six places. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/super.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 0805dd3b856e..2a6a908d0017 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -775,9 +775,6 @@ find_root:
if (IS_ERR(new_root))
return ERR_CAST(new_root);
- if (btrfs_root_refs(&new_root->root_item) == 0)
- return ERR_PTR(-ENOENT);
-
dir_id = btrfs_root_dirid(&new_root->root_item);
setup_root:
location.objectid = dir_id;