From: Tsutomu Itoh Date: Thu, 6 Sep 2012 09:08:59 +0000 (-0600) Subject: Btrfs: fix error handling in delete_block_group_cache() X-Git-Tag: next-20121002~89^2~60 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f54fb859da53f04a443c5e3f4cb9b936ed42d227;p=karo-tx-linux.git Btrfs: fix error handling in delete_block_group_cache() btrfs_iget() never return NULL. So, NULL check is unnecessary. Signed-off-by: Tsutomu Itoh --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 5a15c96a18ff..7e7fd1bcfc54 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3270,8 +3270,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_OR_NULL(inode) || is_bad_inode(inode)) { - if (inode && !IS_ERR(inode)) + if (IS_ERR(inode) || is_bad_inode(inode)) { + if (!IS_ERR(inode)) iput(inode); return -ENOENT; }