summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/mount3.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/nfs/server/src/mount3.c')
-rw-r--r--xlators/nfs/server/src/mount3.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c
index 3ea4bc8e893..84e1456fb64 100644
--- a/xlators/nfs/server/src/mount3.c
+++ b/xlators/nfs/server/src/mount3.c
@@ -766,6 +766,14 @@ mnt3svc_mnt (rpcsvc_request_t *req)
goto mnterr;
}
+ if ((is_nfs_subvolume_disabled (nfs_state (ms->nfsx), exp->vol))) {
+ gf_log (GF_MNT, GF_LOG_ERROR, "Volume is disabled: %s",
+ exp->vol->name);
+ ret = RPCSVC_ACTOR_ERROR;
+ mntstat = MNT3ERR_INVAL;
+ goto mnterr;
+ }
+
ret = mnt3_check_client_net (ms, req, exp->vol);
if (ret == -1) {
mntstat = MNT3ERR_ACCES;