OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] NFS: put net in case of idr allocation failure
[PATCH] NFS: put net in case of idr allocation failure [message #47612] Mon, 20 August 2012 13:43 Go to previous message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
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);
}
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH v4 00/10] NFS: callback threads containerization
Next Topic: [PATCH] NFS: free client is case of idr allocation failure
Goto Forum:
  


Current Time: Mon May 20 02:38:19 GMT 2024

Total time taken to generate the page: 0.01406 seconds