提交 f86a4866 编写于 作者: D Dan Carpenter 提交者: Ilya Dryomov

ceph: fix a NULL vs IS_ERR() check when calling ceph_lookup_inode()

The ceph_lookup_inode() function returns error pointers.  It never
returns NULL.

Fixes: aa87052d ("ceph: fix incorrectly showing the .snap size for stat")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJeff Layton <jlayton@kernel.org>
Reviewed-by: NXiubo Li <xiubli@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 3a4e894f
......@@ -2492,7 +2492,7 @@ int ceph_getattr(struct user_namespace *mnt_userns, const struct path *path,
struct inode *parent;
parent = ceph_lookup_inode(sb, ceph_ino(inode));
if (!parent)
if (IS_ERR(parent))
return PTR_ERR(parent);
pci = ceph_inode(parent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部