summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorTsutomu Itoh2012-09-06 11:08:59 +0200
committerChris Mason2012-10-01 21:19:14 +0200
commitf54fb859da53f04a443c5e3f4cb9b936ed42d227 (patch)
tree21fba36b78cf33ada070fdfea0529cac8b4b6194 /fs/btrfs
parentBtrfs: fix wrong size for the reservation when doing, file pre-allocation. (diff)
downloadkernel-qcow2-linux-f54fb859da53f04a443c5e3f4cb9b936ed42d227.tar.gz
kernel-qcow2-linux-f54fb859da53f04a443c5e3f4cb9b936ed42d227.tar.xz
kernel-qcow2-linux-f54fb859da53f04a443c5e3f4cb9b936ed42d227.zip
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/relocation.c4
1 files changed, 2 insertions, 2 deletions
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;
}