From: Dan Carpenter Date: Wed, 25 Aug 2010 07:11:35 +0000 (+0200) Subject: ceph: ceph_get_inode() returns an ERR_PTR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac1f12ef569d49b013c3db86e11be7e15d66b1c3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Sage Weil --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 3e6b52cb5ee8..e7cca414da03 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1230,11 +1230,11 @@ retry_lookup: 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);