aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/blocklayout/blocklayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/blocklayout/blocklayout.c')
-rw-r--r--fs/nfs/blocklayout/blocklayout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index dc23833c0231..dee6cae80fea 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -993,17 +993,20 @@ static int __init nfs4blocklayout_init(void)
993 mnt, 993 mnt,
994 NFS_PIPE_DIRNAME, 0, &path); 994 NFS_PIPE_DIRNAME, 0, &path);
995 if (ret) 995 if (ret)
996 goto out_remove; 996 goto out_putrpc;
997 997
998 bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL, 998 bl_device_pipe = rpc_mkpipe(path.dentry, "blocklayout", NULL,
999 &bl_upcall_ops, 0); 999 &bl_upcall_ops, 0);
1000 path_put(&path);
1000 if (IS_ERR(bl_device_pipe)) { 1001 if (IS_ERR(bl_device_pipe)) {
1001 ret = PTR_ERR(bl_device_pipe); 1002 ret = PTR_ERR(bl_device_pipe);
1002 goto out_remove; 1003 goto out_putrpc;
1003 } 1004 }
1004out: 1005out:
1005 return ret; 1006 return ret;
1006 1007
1008out_putrpc:
1009 rpc_put_mount();
1007out_remove: 1010out_remove:
1008 pnfs_unregister_layoutdriver(&blocklayout_type); 1011 pnfs_unregister_layoutdriver(&blocklayout_type);
1009 return ret; 1012 return ret;
@@ -1016,6 +1019,7 @@ static void __exit nfs4blocklayout_exit(void)
1016 1019
1017 pnfs_unregister_layoutdriver(&blocklayout_type); 1020 pnfs_unregister_layoutdriver(&blocklayout_type);
1018 rpc_unlink(bl_device_pipe); 1021 rpc_unlink(bl_device_pipe);
1022 rpc_put_mount();
1019} 1023}
1020 1024
1021MODULE_ALIAS("nfs-layouttype4-3"); 1025MODULE_ALIAS("nfs-layouttype4-3");