diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2013-05-13 09:53:35 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-06-14 11:29:30 -0400 |
commit | 3c64a1aba7cfcb04f79e76f859b3d66660275d59 (patch) | |
tree | b84ec1bcce88d60d5c3fd7a68d4dbcbdf985a6cb /fs/btrfs/file.c | |
parent | b1b195969fe6d936f8c8bb63abf7efd2cc4cd5cf (diff) |
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 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index b3e359bc8e68..185af15ad9e4 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -308,10 +308,6 @@ static int __btrfs_run_defrag_inode(struct btrfs_fs_info *fs_info, | |||
308 | ret = PTR_ERR(inode_root); | 308 | ret = PTR_ERR(inode_root); |
309 | goto cleanup; | 309 | goto cleanup; |
310 | } | 310 | } |
311 | if (btrfs_root_refs(&inode_root->root_item) == 0) { | ||
312 | ret = -ENOENT; | ||
313 | goto cleanup; | ||
314 | } | ||
315 | 311 | ||
316 | key.objectid = defrag->ino; | 312 | key.objectid = defrag->ino; |
317 | btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); | 313 | btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); |