提交 4cbd1149 编写于 作者: D Dan Carpenter 提交者: Chris Mason

Btrfs: btrfs_iget() returns ERR_PTR

btrfs_iget() returns an ERR_PTR() on failure and not null.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 676e4c86
......@@ -392,8 +392,8 @@ static struct dentry *get_default_root(struct super_block *sb,
location.offset = 0;
inode = btrfs_iget(sb, &location, new_root, &new);
if (!inode)
return ERR_PTR(-ENOMEM);
if (IS_ERR(inode))
return ERR_CAST(inode);
/*
* If we're just mounting the root most subvol put the inode and return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册