From patchwork Thu Nov 25 05:54:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mi Jinlong X-Patchwork-Id: 356012 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAP5ov1A025996 for ; Thu, 25 Nov 2010 05:50:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751119Ab0KYFu4 (ORCPT ); Thu, 25 Nov 2010 00:50:56 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:59753 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750919Ab0KYFuz (ORCPT ); Thu, 25 Nov 2010 00:50:55 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 61FF6170ED9; Thu, 25 Nov 2010 13:50:48 +0800 (CST) Received: from mailserver.fnst.cn.fujitus.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id oAP5kGR8028948; Thu, 25 Nov 2010 13:46:16 +0800 Received: from [127.0.0.1] ([10.167.225.24]) by mailserver.fnst.cn.fujitus.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2010112513510459-98897 ; Thu, 25 Nov 2010 13:51:04 +0800 Message-ID: <4CEDFA23.5030103@cn.fujitsu.com> Date: Thu, 25 Nov 2010 13:54:43 +0800 From: Mi Jinlong User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Steve Dickson CC: NFSv3 list Subject: [PATCH] mount: make sure mount correctly when kernel not support NFSv4 X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-25 13:51:04, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2010-11-25 13:51:05, Serialize complete at 2010-11-25 13:51:05 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Nov 2010 05:50:57 +0000 (UTC) diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 50a1a2a..e880c45 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -788,6 +788,10 @@ static int nfs_autonegotiate(struct nfsmount_info *mi) /* Linux servers prior to 2.6.25 may return * EPERM when NFS version 4 is not supported. */ goto fall_back; + case EINVAL: + /* If Linux kernel don't support NFSv4, the EINVAL + * will be return for parsing option (vers=4) fail. */ + goto fall_back; default: return result; }