Skip to content

Commit

Permalink
ceph: ceph_get_inode() returns an ERR_PTR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Sage Weil committed Aug 25, 2010
1 parent 36e2168 commit ac1f12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac1f12e

Please sign in to comment.