diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-29 23:04:45 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 13:13:02 +0200 |
commit | 2e19f1f9d31b3515356710b8bdfb655f47a98448 (patch) | |
tree | 41d6d39adc85c8d15a21974f995565cce1391b31 /fs/btrfs/relocation.c | |
parent | 1e7e1f9e3aba00c9b9c323bfeeddafe69ff21ff6 (diff) | |
download | lwn-2e19f1f9d31b3515356710b8bdfb655f47a98448.tar.gz lwn-2e19f1f9d31b3515356710b8bdfb655f47a98448.zip |
btrfs: btrfs_iget never returns an is_bad_inode inode
Just get rid of pointless checks.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index d6bcf558789e..8783a1776540 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3470,11 +3470,8 @@ static int delete_block_group_cache(struct btrfs_fs_info *fs_info, key.offset = 0; inode = btrfs_iget(fs_info->sb, &key, root, NULL); - if (IS_ERR(inode) || is_bad_inode(inode)) { - if (!IS_ERR(inode)) - iput(inode); + if (IS_ERR(inode)) return -ENOENT; - } truncate: ret = btrfs_check_trunc_cache_free_space(fs_info, @@ -4155,7 +4152,7 @@ struct inode *create_reloc_inode(struct btrfs_fs_info *fs_info, key.type = BTRFS_INODE_ITEM_KEY; key.offset = 0; inode = btrfs_iget(fs_info->sb, &key, root, NULL); - BUG_ON(IS_ERR(inode) || is_bad_inode(inode)); + BUG_ON(IS_ERR(inode)); BTRFS_I(inode)->index_cnt = group->key.objectid; err = btrfs_orphan_add(trans, BTRFS_I(inode)); |