From patchwork Fri Jan 25 08:52:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fanchaoting X-Patchwork-Id: 2041691 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 19F3CDF223 for ; Fri, 25 Jan 2013 08:52:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950Ab3AYIv7 (ORCPT ); Fri, 25 Jan 2013 03:51:59 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:53643 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751218Ab3AYIvs (ORCPT ); Fri, 25 Jan 2013 03:51:48 -0500 X-IronPort-AV: E=Sophos;i="4.84,537,1355068800"; d="scan'208";a="6645890" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 25 Jan 2013 16:49:39 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r0P8pkrk002766; Fri, 25 Jan 2013 16:51:46 +0800 Received: from [127.0.0.1] ([10.167.225.240]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013012516504795-59179 ; Fri, 25 Jan 2013 16:50:47 +0800 Message-ID: <510247B8.4020207@cn.fujitsu.com> Date: Fri, 25 Jan 2013 16:52:08 +0800 From: fanchaoting User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: "bfields@fieldses.org" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] nfsd: Check the nfsd support version when enable or disable the minorversion References: <50FFB43A.8030105@cn.fujitsu.com> <20130123232458.GB6565@fieldses.org> In-Reply-To: <20130123232458.GB6565@fieldses.org> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/25 16:50:47, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/01/25 16:50:48, Serialize complete at 2013/01/25 16:50:48 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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 reported-by:) before seeing this.--b. --- 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 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)