Commit f54fb859da53f04a443c5e3f4cb9b936ed42d227

Authored by Tsutomu Itoh
Committed by Chris Mason
1 parent 903889f462

Btrfs: fix error handling in delete_block_group_cache()

btrfs_iget() never return NULL.
So, NULL check is unnecessary.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

fs/btrfs/relocation.c
... ... @@ -3270,8 +3270,8 @@
3270 3270 key.offset = 0;
3271 3271  
3272 3272 inode = btrfs_iget(fs_info->sb, &key, root, NULL);
3273   - if (IS_ERR_OR_NULL(inode) || is_bad_inode(inode)) {
3274   - if (inode && !IS_ERR(inode))
  3273 + if (IS_ERR(inode) || is_bad_inode(inode)) {
  3274 + if (!IS_ERR(inode))
3275 3275 iput(inode);
3276 3276 return -ENOENT;
3277 3277 }