Skip to content

Commit

Permalink
NFS: correctly report misuse of "migration" mount option.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
neilbrown authored and Trond Myklebust committed Nov 15, 2013
1 parent 6d769f1 commit 9e08ef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 9e08ef1

Please sign in to comment.