summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-11-14 06:00:17 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-15 22:41:43 +0400
commit9e08ef1afb109c2059e7c1e4755fcafd9be37260 (patch)
tree5830ab17b4adba9246dc3de557730e585675966b /fs/nfs
parent6d769f1e1420179d1f83cf1a9cdc585b46c28545 (diff)
downloadlinux-9e08ef1afb109c2059e7c1e4755fcafd9be37260.tar.xz
NFS: correctly report misuse of "migration" mount option.
The current test on valid use of the "migration" mount option can never report an error as it will only do so if mnt->version !=4 && mnt->minor_version != 0 (and some other condition), but if that test would succeed, then the previous test has already gone-to out_minorversion_mismatch. So change the && to an || to get correct semantics. Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 317d6fc2160e..910ed906eb82 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1614,7 +1614,7 @@ static int nfs_parse_mount_options(char *raw,
goto out_minorversion_mismatch;
if (mnt->options & NFS_OPTION_MIGRATION &&
- mnt->version != 4 && mnt->minorversion != 0)
+ (mnt->version != 4 || mnt->minorversion != 0))
goto out_migration_misuse;
/*