diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2012-09-06 05:08:59 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-10-01 15:19:14 -0400 |
commit | f54fb859da53f04a443c5e3f4cb9b936ed42d227 (patch) | |
tree | 21fba36b78cf33ada070fdfea0529cac8b4b6194 /fs/btrfs/relocation.c | |
parent | 903889f462409c816893abd02d88636f7b4a7774 (diff) |
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/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 4 |
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, | |||
3270 | key.offset = 0; | 3270 | key.offset = 0; |
3271 | 3271 | ||
3272 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); | 3272 | inode = btrfs_iget(fs_info->sb, &key, root, NULL); |
3273 | if (IS_ERR_OR_NULL(inode) || is_bad_inode(inode)) { | 3273 | if (IS_ERR(inode) || is_bad_inode(inode)) { |
3274 | if (inode && !IS_ERR(inode)) | 3274 | if (!IS_ERR(inode)) |
3275 | iput(inode); | 3275 | iput(inode); |
3276 | return -ENOENT; | 3276 | return -ENOENT; |
3277 | } | 3277 | } |