pnfsblock: add missing rpc_put_mount and path_put
Subsystems (2)
PATCH 1/1 pnfsblock: add missing rpc_put_mount and path_put
Reported-by Jeff Layton <[email protected]>
Signed-off-by Peng Tao <[email protected]>
--- fs/nfs/blocklayout/blocklayout.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
fs/nfs/blocklayout/blocklayout.c +6 -2
@@ -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" );
Signature · 1 line
1.7.1.262.g5ef3d
Quoted 34 lines · On Tue, 13 Sep 2011 09:16:26 -0700 Peng Tao <[email protected]> wrote:
Reported-by Jeff Layton <[email protected]>Signed-off-by Peng Tao <[email protected]>--- fs/nfs/blocklayout/blocklayout.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)fs/nfs/blocklayout/blocklayout.c +5
-2@@ -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:
fs/nfs/blocklayout/blocklayout.c static void __exit nfs4blocklayout_exit(void) · line 1044
Quoted 7 lines
fs/nfs/blocklayout/blocklayout.c +1
-0@@ -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" );
Looks correct. Thanks.
Reviewed-by Jeff Layton <[email protected]>