Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2523872rwi; Fri, 28 Oct 2022 08:04:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Zhf0zBvKamcnPAx4ow/VIjhdy480ZU4rmyx3+rmCo3ltMhvaP2JqoRevVRD5LvXPPEKyH X-Received: by 2002:a05:6a00:1505:b0:56b:6d78:3304 with SMTP id q5-20020a056a00150500b0056b6d783304mr35784082pfu.44.1666969465945; Fri, 28 Oct 2022 08:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666969465; cv=none; d=google.com; s=arc-20160816; b=WAoNkGE8lRDJx+q5NtgKGnfD7MgOWOshVbMm+L3YqlrXH+iZqdqLKK//ge5p7of7N8 J55UBX6kMEecn0xvb5Giaxes5Ki/GTUTbbXPMBl2S1ch8vFEvIH8Skwz6OSrFLccy8le jbwVmqUBHswiHom34viTzHEIlIN35GqZhsb4hsFXSfpIfcAD4Ci3n0hSFwVKamDUJZxe +2qXfKLcjFVxjgW19/j4kzWGdAO7yde/0OGsqGo14An2H+ZoW9MM91MBnMMtcnx1ke9w crrbRclPGCkRsrM1jKSHvY4LVAd9EgODo1RQ+My4nJq+GpBXIb/XEVrPDOUBbXK9fHb7 24Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject; bh=RufQU3M0usByGDtpOzNdD9huGjxf40OOewqlyYvUW7Q=; b=uCyFNGMEcd/ALH+aVRVsCf5bfYcyaSKDgByf2OGjWHx9Ur8Xceu9vu6b2UL5INW4M8 2TjWf37nqrFe4Gw0qe0kyx3mxkWmejDXvD13bWxgrQOiNoUGSRPgGHbZq5XNFt8eL61d uqx9tTn7kHA4JX4bN7SDzhF/lnGgQgS0rsAj2ilP7FhfEwpRqujjc+N+hRcMFe7C6IyP kPk0a7mc4lo9SbmY3b9N9plsmA9PrWlqL+sZy41E0DUd1vWJaDWZJ/cxHxop6PZIn6dG L86oHTSZeD/v667sVIALIdNHPY/ZxC6E2XItwJnbAIcOylTSEW4fXiKayus5Dkjeuzll QwnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a17090301d200b0018537cc29f9si6250611plh.15.2022.10.28.08.04.07; Fri, 28 Oct 2022 08:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231553AbiJ1OtH (ORCPT + 99 others); Fri, 28 Oct 2022 10:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbiJ1Os3 (ORCPT ); Fri, 28 Oct 2022 10:48:29 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C15A1F8128 for ; Fri, 28 Oct 2022 07:47:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 38E6CCE2BD5 for ; Fri, 28 Oct 2022 14:47:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F743C433C1; Fri, 28 Oct 2022 14:47:23 +0000 (UTC) Subject: [PATCH v7 08/14] NFSD: Update file_hashtbl() helpers From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: neilb@suse.de, jlayton@redhat.com Date: Fri, 28 Oct 2022 10:47:22 -0400 Message-ID: <166696844244.106044.9547058764290901363.stgit@klimt.1015granger.net> In-Reply-To: <166696812922.106044.679812521105874329.stgit@klimt.1015granger.net> References: <166696812922.106044.679812521105874329.stgit@klimt.1015granger.net> User-Agent: StGit/1.5.dev3+g9561319 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Enable callers to use const pointers for type safety. Signed-off-by: Chuck Lever Reviewed-by: NeilBrown --- fs/nfsd/nfs4state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2e6e1ee096b5..60f1aa2c5442 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -710,7 +710,7 @@ static unsigned int ownerstr_hashval(struct xdr_netobj *ownername) #define FILE_HASH_BITS 8 #define FILE_HASH_SIZE (1 << FILE_HASH_BITS) -static unsigned int file_hashval(struct svc_fh *fh) +static unsigned int file_hashval(const struct svc_fh *fh) { struct inode *inode = d_inode(fh->fh_dentry); @@ -4671,7 +4671,7 @@ move_to_close_lru(struct nfs4_ol_stateid *s, struct net *net) /* search file_hashtbl[] for file */ static struct nfs4_file * -find_file_locked(struct svc_fh *fh, unsigned int hashval) +find_file_locked(const struct svc_fh *fh, unsigned int hashval) { struct nfs4_file *fp;