diff options
-rw-r--r-- | fs/nfs/super.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index d18a90ba165f..d05024a18984 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1531,6 +1531,9 @@ static int nfs_parse_mount_options(char *raw, | |||
1531 | if (!sloppy && invalid_option) | 1531 | if (!sloppy && invalid_option) |
1532 | return 0; | 1532 | return 0; |
1533 | 1533 | ||
1534 | if (mnt->minorversion && mnt->version != 4) | ||
1535 | goto out_minorversion_mismatch; | ||
1536 | |||
1534 | /* | 1537 | /* |
1535 | * verify that any proto=/mountproto= options match the address | 1538 | * verify that any proto=/mountproto= options match the address |
1536 | * familiies in the addr=/mountaddr= options. | 1539 | * familiies in the addr=/mountaddr= options. |
@@ -1564,6 +1567,10 @@ out_invalid_address: | |||
1564 | out_invalid_value: | 1567 | out_invalid_value: |
1565 | printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); | 1568 | printk(KERN_INFO "NFS: bad mount option value specified: %s\n", p); |
1566 | return 0; | 1569 | return 0; |
1570 | out_minorversion_mismatch: | ||
1571 | printk(KERN_INFO "NFS: mount option vers=%u does not support " | ||
1572 | "minorversion=%u\n", mnt->version, mnt->minorversion); | ||
1573 | return 0; | ||
1567 | out_nomem: | 1574 | out_nomem: |
1568 | printk(KERN_INFO "NFS: not enough memory to parse option\n"); | 1575 | printk(KERN_INFO "NFS: not enough memory to parse option\n"); |
1569 | return 0; | 1576 | return 0; |