diff mbox

nfsd: Check the nfsd support version when enable or disable the minorversion

Message ID 510247B8.4020207@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

fanchaoting Jan. 25, 2013, 8:52 a.m. UTC
when enable or disable the minorversion throw /proc/fs/nfsd/versions,
it should check the support version. now only nfs4 suppport minorversion.

Signed-off-by: Fan Chaoting <fanchaoting@cn.fujitsu.com>

---
 fs/nfsd/nfsctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

J. Bruce Fields Jan. 29, 2013, 6:13 p.m. UTC | #1
On Fri, Jan 25, 2013 at 04:52:08PM +0800, fanchaoting wrote:
> when enable or disable the minorversion throw /proc/fs/nfsd/versions,
> it should check the support version. now only nfs4 suppport minorversion.
> 
> Signed-off-by: Fan Chaoting <fanchaoting@cn.fujitsu.com>

Apologies, I'd already committed the same fix (and credited you with
reported-by:) before seeing this.--b.

> 
> ---
>  fs/nfsd/nfsctl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 7493428..65889ec 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -534,7 +534,7 @@ static ssize_t __write_versions(struct file *file, char *buf, size_t size)
>                         else
>                                 num = simple_strtol(vers, &minorp, 0);
>                         if (*minorp == '.') {
> -                               if (num < 4)
> +                               if (num != 4)
>                                         return -EINVAL;
>                                 minor = simple_strtoul(minorp+1, NULL, 0);
>                                 if (minor == 0)
> --
> 1.7.10.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 7493428..65889ec 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -534,7 +534,7 @@  static ssize_t __write_versions(struct file *file, char *buf, size_t size)
                        else
                                num = simple_strtol(vers, &minorp, 0);
                        if (*minorp == '.') {
-                               if (num < 4)
+                               if (num != 4)
                                        return -EINVAL;
                                minor = simple_strtoul(minorp+1, NULL, 0);
                                if (minor == 0)