public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [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, netdev,
	kernel-janitors

__rpc_lookup_create() can return ERR_PTR(-ENOMEM).

Signed-off-by: Dan Carpenter <error27@gmail.com>

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);

^ 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, netdev,
	kernel-janitors

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@gmail.com>

Well spotted. Applied!

Cheers
  Trond

^ 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