diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-10 08:04:40 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:27 -0500 |
commit | 2561d618ffb615f92fe17f0cf6b03f8e5cddb2cb (patch) | |
tree | 8b7a4c70c4d3d3d56f11e5ad077a1756b5407c5c | |
parent | 627f30668fac12f5bd555a2cc22af2323762fe8d (diff) |
NFS: remove RPC PipeFS mount point reference from blocklayout routines
This is a cleanup patch. We don't need this reference anymore, because
blocklayout pipes dentries now creates and destroys in per-net operations and
on PipeFS mount/umount notification.
Note that nfs4blocklayout_register_net() now returns 0 instead of -ENOENT in
case of PipeFS superblock absence. This is ok, because blocklayout pipe dentry
will be created on PipeFS mount event.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index df05b9465146..783ebd51bd5f 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c | |||
@@ -1094,7 +1094,7 @@ static struct dentry *nfs4blocklayout_register_net(struct net *net, | |||
1094 | 1094 | ||
1095 | pipefs_sb = rpc_get_sb_net(net); | 1095 | pipefs_sb = rpc_get_sb_net(net); |
1096 | if (!pipefs_sb) | 1096 | if (!pipefs_sb) |
1097 | return ERR_PTR(-ENOENT); | 1097 | return NULL; |
1098 | dentry = nfs4blocklayout_register_sb(pipefs_sb, pipe); | 1098 | dentry = nfs4blocklayout_register_sb(pipefs_sb, pipe); |
1099 | rpc_put_sb_net(net); | 1099 | rpc_put_sb_net(net); |
1100 | return dentry; | 1100 | return dentry; |
@@ -1145,7 +1145,6 @@ static struct pernet_operations nfs4blocklayout_net_ops = { | |||
1145 | 1145 | ||
1146 | static int __init nfs4blocklayout_init(void) | 1146 | static int __init nfs4blocklayout_init(void) |
1147 | { | 1147 | { |
1148 | struct vfsmount *mnt; | ||
1149 | int ret; | 1148 | int ret; |
1150 | 1149 | ||
1151 | dprintk("%s: NFSv4 Block Layout Driver Registering...\n", __func__); | 1150 | dprintk("%s: NFSv4 Block Layout Driver Registering...\n", __func__); |
@@ -1155,12 +1154,6 @@ static int __init nfs4blocklayout_init(void) | |||
1155 | goto out; | 1154 | goto out; |
1156 | 1155 | ||
1157 | init_waitqueue_head(&bl_wq); | 1156 | init_waitqueue_head(&bl_wq); |
1158 | |||
1159 | mnt = rpc_get_mount(); | ||
1160 | if (IS_ERR(mnt)) { | ||
1161 | ret = PTR_ERR(mnt); | ||
1162 | goto out_remove; | ||
1163 | } | ||
1164 | ret = rpc_pipefs_notifier_register(&nfs4blocklayout_block); | 1157 | ret = rpc_pipefs_notifier_register(&nfs4blocklayout_block); |
1165 | if (ret) | 1158 | if (ret) |
1166 | goto out_remove; | 1159 | goto out_remove; |