From 23fa76b0ba78b7d84708d9ee683587d8a5bbceef Mon Sep 17 00:00:00 2001 From: Stefan Behrens Date: Fri, 23 Aug 2013 10:34:43 +0200 Subject: 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 Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/file.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'fs/btrfs/file.c') diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 5e7ea996f105..5ba87b0d2ef8 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -310,11 +310,6 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info, goto cleanup; } - if (btrfs_root_refs(&inode_root->root_item) == 0) { - ret = -ENOENT; - goto cleanup; - } - key.objectid = defrag->ino; btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); key.offset = 0; -- cgit v1.2.3