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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Dan Carpenter 2010-08-25 09:11:35 +02:00 committed by Sage Weil
parent 36e21687e6
commit ac1f12ef56

View file

@ -1230,11 +1230,11 @@ retry_lookup:
in = dn->d_inode; in = dn->d_inode;
} else { } else {
in = ceph_get_inode(parent->d_sb, vino); in = ceph_get_inode(parent->d_sb, vino);
if (in == NULL) { if (IS_ERR(in)) {
dout("new_inode badness\n"); dout("new_inode badness\n");
d_delete(dn); d_delete(dn);
dput(dn); dput(dn);
err = -ENOMEM; err = PTR_ERR(in);
goto out; goto out;
} }
dn = splice_dentry(dn, in, NULL); dn = splice_dentry(dn, in, NULL);