diff options
author | Omar Sandoval <osandov@fb.com> | 2018-05-11 13:13:34 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:23:49 +0200 |
commit | 05a5bd7c4decf828f79b62863e520c9ff86eef72 (patch) | |
tree | e94cf143f9b8a518941d0d8d40268e31d09962dd /fs/btrfs/inode.c | |
parent | 7b40b695b4d06666c4665f6b5718085f2c6a5da2 (diff) | |
download | linux-stable-05a5bd7c4decf828f79b62863e520c9ff86eef72.tar.gz linux-stable-05a5bd7c4decf828f79b62863e520c9ff86eef72.tar.bz2 linux-stable-05a5bd7c4decf828f79b62863e520c9ff86eef72.zip |
Btrfs: delete dead code in btrfs_orphan_commit_root()
btrfs_orphan_commit_root() tries to delete an orphan item for a
subvolume in the tree root, but we don't actually insert that item in
the first place. See commit 0a0d4415e338 ("Btrfs: delete dead code in
btrfs_orphan_add()"). We can get rid of it.
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c78e91619c76..06506cd00e4a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3307,7 +3307,6 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_block_rsv *block_rsv; - int ret; if (atomic_read(&root->orphan_inodes) || root->orphan_cleanup_state != ORPHAN_CLEANUP_DONE) @@ -3328,17 +3327,6 @@ void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans, root->orphan_block_rsv = NULL; spin_unlock(&root->orphan_lock); - if (test_bit(BTRFS_ROOT_ORPHAN_ITEM_INSERTED, &root->state) && - btrfs_root_refs(&root->root_item) > 0) { - ret = btrfs_del_orphan_item(trans, fs_info->tree_root, - root->root_key.objectid); - if (ret) - btrfs_abort_transaction(trans, ret); - else - clear_bit(BTRFS_ROOT_ORPHAN_ITEM_INSERTED, - &root->state); - } - if (block_rsv) { WARN_ON(block_rsv->size > 0); btrfs_free_block_rsv(fs_info, block_rsv); |