* [patch] ceph: ceph_get_inode() returns an ERR_PTR
@ 2010-08-25 7:11 Dan Carpenter
2010-08-25 19:01 ` Sage Weil
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-08-25 7:11 UTC (permalink / raw)
To: Sage Weil; +Cc: Yehuda Sadeh, ceph-devel, linux-kernel, kernel-janitors
ceph_get_inode() returns an ERR_PTR and it doesn't return a NULL.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 5d893d3..1e623ec 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1229,11 +1229,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);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] ceph: ceph_get_inode() returns an ERR_PTR
2010-08-25 7:11 [patch] ceph: ceph_get_inode() returns an ERR_PTR Dan Carpenter
@ 2010-08-25 19:01 ` Sage Weil
0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2010-08-25 19:01 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Yehuda Sadeh, ceph-devel, linux-kernel, kernel-janitors
Thanks, queueing this up!
sage
On Wed, 25 Aug 2010, Dan Carpenter wrote:
> ceph_get_inode() returns an ERR_PTR and it doesn't return a NULL.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index 5d893d3..1e623ec 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -1229,11 +1229,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);
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-25 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25 7:11 [patch] ceph: ceph_get_inode() returns an ERR_PTR Dan Carpenter
2010-08-25 19:01 ` Sage Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox