mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
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>
This commit is contained in:
parent
903889f462
commit
f54fb859da
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user