Skip to content

Commit 9e08ef1

Browse files
neilbrownTrond Myklebust
authored andcommitted
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 <[email protected]> Acked-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 6d769f1 commit 9e08ef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ static int nfs_parse_mount_options(char *raw,
16141614
goto out_minorversion_mismatch;
16151615

16161616
if (mnt->options & NFS_OPTION_MIGRATION &&
1617-
mnt->version != 4 && mnt->minorversion != 0)
1617+
(mnt->version != 4 || mnt->minorversion != 0))
16181618
goto out_migration_misuse;
16191619

16201620
/*

0 commit comments

Comments
 (0)