* [patch] sunrpc: handle allocation errors from __rpc_lookup_create()
@ 2010-03-21 9:28 Dan Carpenter
2010-03-21 16:27 ` Trond Myklebust
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-03-21 9:28 UTC (permalink / raw)
To: Trond Myklebust
Cc: J. Bruce Fields, Neil Brown, David S. Miller,
linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 8d63f8f..20e30c6 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name);
+ if (IS_ERR(dentry))
+ return dentry;
if (dentry->d_inode == NULL)
return dentry;
dput(dentry);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] sunrpc: handle allocation errors from __rpc_lookup_create()
2010-03-21 9:28 [patch] sunrpc: handle allocation errors from __rpc_lookup_create() Dan Carpenter
@ 2010-03-21 16:27 ` Trond Myklebust
0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2010-03-21 16:27 UTC (permalink / raw)
To: Dan Carpenter
Cc: J. Bruce Fields, Neil Brown, David S. Miller,
linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Sun, 2010-03-21 at 12:28 +0300, Dan Carpenter wrote:
> __rpc_lookup_create() can return ERR_PTR(-ENOMEM).
>
> Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Well spotted. Applied!
Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-03-21 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-21 9:28 [patch] sunrpc: handle allocation errors from __rpc_lookup_create() Dan Carpenter
2010-03-21 16:27 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).