Btrfs: btrfs_iget() returns ERR_PTR
btrfs_iget() returns an ERR_PTR() on failure and not null. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
676e4c8639
commit
4cbd1149fb
|
@ -392,8 +392,8 @@ setup_root:
|
||||||
location.offset = 0;
|
location.offset = 0;
|
||||||
|
|
||||||
inode = btrfs_iget(sb, &location, new_root, &new);
|
inode = btrfs_iget(sb, &location, new_root, &new);
|
||||||
if (!inode)
|
if (IS_ERR(inode))
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_CAST(inode);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're just mounting the root most subvol put the inode and return
|
* If we're just mounting the root most subvol put the inode and return
|
||||||
|
|
Loading…
Reference in New Issue