aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2011-03-01 01:34:12 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-11 15:38:41 -0500
commit94de8b27d0dcb2608d56a7e5c2941b87e6da7ce3 (patch)
treebd4b98e229bfbb9d6276e663b2eaca4c70b5bba1 /fs/nfs/client.c
parentd6fb79d433d0a34c36bdf74eaf90857193a6261f (diff)
NFSv4.1: add MDS mount DS only check
The DS only role cannot be used to mount. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 280d41f64a5..d5c5bdfa423 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1453,6 +1453,10 @@ static int nfs4_server_common_setup(struct nfs_server *server,
BUG_ON(!server->nfs_client->rpc_ops);
BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
+ /* data servers support only a subset of NFSv4.1 */
+ if (is_ds_only_client(server->nfs_client))
+ return -EPROTONOSUPPORT;
+
fattr = nfs_alloc_fattr();
if (fattr == NULL)
return -ENOMEM;