summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-08-23 10:34:43 +0200
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:16:29 -0400
commit23fa76b0ba78b7d84708d9ee683587d8a5bbceef (patch)
tree10f09a05563e978d57228943f83fd1cf1c21d388 /fs/btrfs/scrub.c
parent48475471728f060bfd2e686f592ef208d3ba8b7d (diff)
downloadop-kernel-dev-23fa76b0ba78b7d84708d9ee683587d8a5bbceef.zip
op-kernel-dev-23fa76b0ba78b7d84708d9ee683587d8a5bbceef.tar.gz
Btrf: cleanup: don't check for root_refs == 0 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 three more places. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ec6a33a..0afcd45 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3217,11 +3217,6 @@ static int copy_nocow_pages_for_inode(u64 inum, u64 offset, u64 root, void *ctx)
return PTR_ERR(local_root);
}
- if (btrfs_root_refs(&local_root->root_item) == 0) {
- srcu_read_unlock(&fs_info->subvol_srcu, srcu_index);
- return -ENOENT;
- }
-
key.type = BTRFS_INODE_ITEM_KEY;
key.objectid = inum;
key.offset = 0;
OpenPOWER on IntegriCloud