提交 9e08ef1a 编写于 作者: N NeilBrown 提交者: Trond Myklebust

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: NNeilBrown <neilb@suse.de>
Acked-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 6d769f1e
...@@ -1614,7 +1614,7 @@ static int nfs_parse_mount_options(char *raw, ...@@ -1614,7 +1614,7 @@ static int nfs_parse_mount_options(char *raw,
goto out_minorversion_mismatch; goto out_minorversion_mismatch;
if (mnt->options & NFS_OPTION_MIGRATION && if (mnt->options & NFS_OPTION_MIGRATION &&
mnt->version != 4 && mnt->minorversion != 0) (mnt->version != 4 || mnt->minorversion != 0))
goto out_migration_misuse; goto out_migration_misuse;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册