Commit 760383f1 authored by Peng Tao's avatar Peng Tao Committed by Trond Myklebust

pnfsblock: add missing rpc_put_mount and path_put

Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarPeng Tao <peng_tao@emc.com>
Signed-off-by: default avatarJim Rees <rees@umich.edu>
Cc: stable@kernel.org [3.0]
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c1225158
...@@ -993,17 +993,20 @@ static int __init nfs4blocklayout_init(void) ...@@ -993,17 +993,20 @@ static int __init nfs4blocklayout_init(void)
mnt, mnt,
NFS_PIPE_DIRNAME, 0, &path); NFS_PIPE_DIRNAME, 0, &path);
if (ret) if (ret)
goto out_remove; goto out_putrpc;
bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL, bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
&bl_upcall_ops, 0); &bl_upcall_ops, 0);
path_put(&path);
if (IS_ERR(bl_device_pipe)) { if (IS_ERR(bl_device_pipe)) {
ret = PTR_ERR(bl_device_pipe); ret = PTR_ERR(bl_device_pipe);
goto out_remove; goto out_putrpc;
} }
out: out:
return ret; return ret;
out_putrpc:
rpc_put_mount();
out_remove: out_remove:
pnfs_unregister_layoutdriver(&blocklayout_type); pnfs_unregister_layoutdriver(&blocklayout_type);
return ret; return ret;
...@@ -1016,6 +1019,7 @@ static void __exit nfs4blocklayout_exit(void) ...@@ -1016,6 +1019,7 @@ static void __exit nfs4blocklayout_exit(void)
pnfs_unregister_layoutdriver(&blocklayout_type); pnfs_unregister_layoutdriver(&blocklayout_type);
rpc_unlink(bl_device_pipe); rpc_unlink(bl_device_pipe);
rpc_put_mount();
} }
MODULE_ALIAS("nfs-layouttype4-3"); MODULE_ALIAS("nfs-layouttype4-3");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment