Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5342955ybl; Tue, 10 Dec 2019 04:34:01 -0800 (PST) X-Google-Smtp-Source: APXvYqxMCJWQ8va8FlmSC+VN/AgtN0vHeqOZdOUBz36NIFbjnRAq5IEzQPQlGxpby5nt8R6nasuv X-Received: by 2002:aca:c389:: with SMTP id t131mr3555420oif.102.1575981241780; Tue, 10 Dec 2019 04:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575981241; cv=none; d=google.com; s=arc-20160816; b=tTHsuaRGyMzBrFV4/OoZp3RSC+tF9Ao7Ou5LtGKmQr0QiTZeew2y78dP5NBlsGeNgI 89nkF3hD++2WUnGbjAGNcHEz/QhFGV6Mw8/dNEvAJvRz6wQpaMmGPyshVRvwQTgouBYu 52k0DhWrP7B6iQuyF/Fb1MbYtsApiuuaCFT42rQiHxIVpYNZ0NmAxZweXqkkA22XA+KN WnF4ywVZeNptD6VqiEeGVeGXUJYxzVexkSJeeA0Rd+cqtP5FJymN9+5MdafieHT/wVaV eaRoiWMHkhW7LV66xT5SP6YBP3k32varNcq+PYSSkCd/4W/s9iEPFgc5JJNgRdJg+B71 qlrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=6FM6XYBQ1hKH0GC/JZnzY8+SSWAtUZ4+Dcf/j3t4Ako=; b=Nadnyl1d+MGl2G6DL8j9lA31LJtiH5xFlZH9PGcp+eTaRgta+i6rkeoUDELSVUCFUB pdV8U5T55djfhG9fPLhzojNsWyu04sJtiWU1wtJl7yRFZw/oc5d6JNfUai1NqNdFeIlr kBxdp3X/XYACs2GANAKTQv703gsr4o8fs2huRUhIVsTnNPRbom9Erk4u1SCscdh9NbT2 H3oe16fUjuRtKD/1wokzvjpwy+B5rs6Ljmw+FVfMoKkmnahd9c8j6MyPTpRG5vRD67Vy 9aG0TslkxTb69E9/jH4EkgTYwc95zpGfNYuKyXbVjH48FO6bzk1t1uMuRBphpONUNvan vpfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aM3Hd+D8; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si1859486otp.35.2019.12.10.04.33.51; Tue, 10 Dec 2019 04:34:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aM3Hd+D8; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbfLJMcT (ORCPT + 99 others); Tue, 10 Dec 2019 07:32:19 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:35433 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727594AbfLJMbZ (ORCPT ); Tue, 10 Dec 2019 07:31:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575981084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6FM6XYBQ1hKH0GC/JZnzY8+SSWAtUZ4+Dcf/j3t4Ako=; b=aM3Hd+D8rUeviKserZSfBUicSWgZrqg2ux2gDhwix+wFU7PV1h1n9z29pTba2R7GxPOwz8 mQic/Xitr94K9oB8nCzr30EVUlC81ZaCO+ecfdd8KKO50PobYqoKmuVOzmqwiic6TWFRj0 Mk7QKBJudcU+Is6Q3/c//utgfnO7c4g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-PcFr5xbYOlSSLBTEwHib9w-1; Tue, 10 Dec 2019 07:31:18 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EED7100551C; Tue, 10 Dec 2019 12:31:17 +0000 (UTC) Received: from coeurl.usersys.redhat.com (ovpn-123-90.rdu2.redhat.com [10.10.123.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CA996F964; Tue, 10 Dec 2019 12:31:17 +0000 (UTC) Received: by coeurl.usersys.redhat.com (Postfix, from userid 1000) id E0C2020C2D; Tue, 10 Dec 2019 07:31:15 -0500 (EST) From: Scott Mayhew To: anna.schumaker@netapp.com, trond.myklebust@hammerspace.com Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v6 17/27] NFS: Constify mount argument match tables Date: Tue, 10 Dec 2019 07:31:05 -0500 Message-Id: <20191210123115.1655-18-smayhew@redhat.com> In-Reply-To: <20191210123115.1655-1-smayhew@redhat.com> References: <20191210123115.1655-1-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: PcFr5xbYOlSSLBTEwHib9w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: David Howells The mount argument match tables should never be altered so constify them. Signed-off-by: David Howells Signed-off-by: Al Viro --- fs/nfs/fs_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c index c8f99a3c7264..8fbfd526d6b8 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -199,7 +199,7 @@ enum { =09Opt_lookupcache_err }; =20 -static match_table_t nfs_lookupcache_tokens =3D { +static const match_table_t nfs_lookupcache_tokens =3D { =09{ Opt_lookupcache_all, "all" }, =09{ Opt_lookupcache_positive, "pos" }, =09{ Opt_lookupcache_positive, "positive" }, @@ -215,7 +215,7 @@ enum { =09Opt_local_lock_err }; =20 -static match_table_t nfs_local_lock_tokens =3D { +static const match_table_t nfs_local_lock_tokens =3D { =09{ Opt_local_lock_all, "all" }, =09{ Opt_local_lock_flock, "flock" }, =09{ Opt_local_lock_posix, "posix" }, @@ -231,7 +231,7 @@ enum { =09Opt_vers_err }; =20 -static match_table_t nfs_vers_tokens =3D { +static const match_table_t nfs_vers_tokens =3D { =09{ Opt_vers_2, "2" }, =09{ Opt_vers_3, "3" }, =09{ Opt_vers_4, "4" }, --=20 2.17.2