提交 f54fb859 编写于 作者: T Tsutomu Itoh 提交者: Chris Mason

Btrfs: fix error handling in delete_block_group_cache()

btrfs_iget() never return NULL.
So, NULL check is unnecessary.
Signed-off-by: NTsutomu Itoh <t-itoh@jp.fujitsu.com>
上级 903889f4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册