提交 ac1f12ef 编写于 作者: D Dan Carpenter 提交者: Sage Weil

ceph: ceph_get_inode() returns an ERR_PTR

ceph_get_inode() returns an ERR_PTR and it doesn't return a NULL.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NSage Weil <sage@newdream.net>
上级 36e21687
......@@ -1230,11 +1230,11 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
in = dn->d_inode;
} else {
in = ceph_get_inode(parent->d_sb, vino);
if (in == NULL) {
if (IS_ERR(in)) {
dout("new_inode badness\n");
d_delete(dn);
dput(dn);
err = -ENOMEM;
err = PTR_ERR(in);
goto out;
}
dn = splice_dentry(dn, in, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册