linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pnfsblock: add missing rpc_put_mount and path_put
@ 2011-09-13 20:24 Jim Rees
  2011-09-14 10:19 ` Benny Halevy
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Rees @ 2011-09-13 20:24 UTC (permalink / raw)
  To: Benny Halevy; +Cc: linux-nfs, peter honeyman

From: Peng Tao <bergwolf@gmail.com>

Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Jim Rees <rees@umich.edu>
---
 fs/nfs/blocklayout/blocklayout.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 9675ef9..8f97578 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1009,17 +1009,20 @@ static int __init nfs4blocklayout_init(void)
 			      mnt,
 			      NFS_PIPE_DIRNAME, 0, &path);
 	if (ret)
-		goto out_remove;
+		goto out_putrpc;
 
 	bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
 				    &bl_upcall_ops, 0);
+	path_put(&path);
 	if (IS_ERR(bl_device_pipe)) {
 		ret = PTR_ERR(bl_device_pipe);
-		goto out_remove;
+		goto out_putrpc;
 	}
 out:
 	return ret;
 
+out_putrpc:
+	rpc_put_mount();
 out_remove:
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 out_stop:
@@ -1035,6 +1038,7 @@ static void __exit nfs4blocklayout_exit(void)
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 	pnfsiod_stop();
 	rpc_unlink(bl_device_pipe);
+	rpc_put_mount();
 }
 
 MODULE_ALIAS("nfs-layouttype4-3");
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] pnfsblock: add missing rpc_put_mount and path_put
@ 2011-09-13 16:16 Peng Tao
  2011-09-13 16:44 ` Jeff Layton
  0 siblings, 1 reply; 8+ messages in thread
From: Peng Tao @ 2011-09-13 16:16 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Jim Rees, Benny Halevy, Jeff Layton, linux-nfs, Peng Tao

Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Peng Tao <peng_tao@emc.com>
---
 fs/nfs/blocklayout/blocklayout.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index cc78e62..66f2f73 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1009,17 +1009,20 @@ static int __init nfs4blocklayout_init(void)
 			      mnt,
 			      NFS_PIPE_DIRNAME, 0, &path);
 	if (ret)
-		goto out_stop;
+		goto out_putrpc;
 
 	bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
 				    &bl_upcall_ops, 0);
+	path_put(&path);
 	if (IS_ERR(bl_device_pipe)) {
 		ret = PTR_ERR(bl_device_pipe);
-		goto out_stop;
+		goto out_putrpc;
 	}
 out:
 	return ret;
 
+out_putrpc:
+	rpc_put_mount();
 out_stop:
 	pnfsiod_stop();
 out_remove:
@@ -1035,6 +1038,7 @@ static void __exit nfs4blocklayout_exit(void)
 	pnfs_unregister_layoutdriver(&blocklayout_type);
 	pnfsiod_stop();
 	rpc_unlink(bl_device_pipe);
+	rpc_put_mount();
 }
 
 MODULE_ALIAS("nfs-layouttype4-3");
-- 
1.7.1.262.g5ef3d


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

end of thread, other threads:[~2011-09-19  3:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 20:24 [PATCH] pnfsblock: add missing rpc_put_mount and path_put Jim Rees
2011-09-14 10:19 ` Benny Halevy
2011-09-19  1:09   ` Myklebust, Trond
2011-09-19  2:04     ` Jim Rees
2011-09-19  2:06       ` Myklebust, Trond
2011-09-19  3:01         ` Benny Halevy
  -- strict thread matches above, loose matches on Subject: below --
2011-09-13 16:16 Peng Tao
2011-09-13 16:44 ` Jeff Layton

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