linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NFS: put net in case of idr allocation failure
@ 2012-08-20 13:43 Stanislav Kinsbursky
  2012-08-20 16:11 ` Myklebust, Trond
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Kinsbursky @ 2012-08-20 13:43 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: bfields, linux-nfs, linux-kernel, devel

Put net reference we got in nfs_alloc_client() on error path.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
 fs/nfs/nfs4client.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index cbcdfaf..b895629 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -74,6 +74,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
 	return clp;
 
 error:
+	put_net(clp->cl_net);
 	kfree(clp);
 	return ERR_PTR(err);
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-20 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 13:43 [PATCH] NFS: put net in case of idr allocation failure Stanislav Kinsbursky
2012-08-20 16:11 ` Myklebust, Trond
2012-08-20 16:14   ` Stanislav Kinsbursky

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