From: NeilBrown Date: Thu, 14 Nov 2013 02:00:17 +0000 (+1100) Subject: NFS: correctly report misuse of "migration" mount option. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e08ef1afb109c2059e7c1e4755fcafd9be37260;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: Chuck Lever Signed-off-by: Trond Myklebust --- 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; /*