From patchwork Wed Sep 3 16:19:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 4835651 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 006B19F38D for ; Wed, 3 Sep 2014 16:19:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E793720115 for ; Wed, 3 Sep 2014 16:19:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A128420114 for ; Wed, 3 Sep 2014 16:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbaICQTR (ORCPT ); Wed, 3 Sep 2014 12:19:17 -0400 Received: from mx12.netapp.com ([216.240.18.77]:17054 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbaICQTQ (ORCPT ); Wed, 3 Sep 2014 12:19:16 -0400 X-IronPort-AV: E=Sophos;i="5.04,458,1406617200"; d="scan'208";a="186072744" Received: from vmwexchts02-prd.hq.netapp.com ([10.122.105.23]) by mx12-out.netapp.com with ESMTP; 03 Sep 2014 09:19:16 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS02-PRD.hq.netapp.com (10.122.105.23) with Microsoft SMTP Server id 15.0.913.22; Wed, 3 Sep 2014 09:19:13 -0700 Received: from davros.com (davros.ocarinaproject.vpn.netapp.com [10.63.232.101]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id s83GJC2U005282; Wed, 3 Sep 2014 09:19:15 -0700 (PDT) From: Anna Schumaker To: , Subject: [PATCH 3/4] NFS: Remove v3 not compiled check from validate_mount_data() Date: Wed, 3 Sep 2014 12:19:09 -0400 Message-ID: <1409761150-30257-4-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1409761150-30257-1-git-send-email-Anna.Schumaker@Netapp.com> References: <1409761150-30257-1-git-send-email-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This check is already performed by the module loading code - if the module can't be found then -EPROTONOSUPPORT will be returned. Let's handle v3 this way, too. Signed-off-by: Anna Schumaker --- fs/nfs/super.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index e4499d5..31a11b0 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2065,11 +2065,6 @@ static int nfs23_validate_mount_data(void *options, return NFS_TEXT_DATA; } -#if !IS_ENABLED(CONFIG_NFS_V3) - if (args->version == 3) - goto out_v3_not_compiled; -#endif /* !CONFIG_NFS_V3 */ - return 0; out_no_data: @@ -2085,12 +2080,6 @@ out_no_sec: dfprintk(MOUNT, "NFS: nfs_mount_data version supports only AUTH_SYS\n"); return -EINVAL; -#if !IS_ENABLED(CONFIG_NFS_V3) -out_v3_not_compiled: - dfprintk(MOUNT, "NFS: NFSv3 is not compiled into kernel\n"); - return -EPROTONOSUPPORT; -#endif /* !CONFIG_NFS_V3 */ - out_nomem: dfprintk(MOUNT, "NFS: not enough memory to handle mount options\n"); return -ENOMEM;