Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1152745rwi; Thu, 27 Oct 2022 11:54:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54EGKU3QlEVAERDpgK+ZECHontG8Ve8sVtyHVWuNPNWWQ1wqS0VWdSnuudkhzlFZ8D0hYm X-Received: by 2002:a17:90b:1e4c:b0:213:32a5:a778 with SMTP id pi12-20020a17090b1e4c00b0021332a5a778mr11988912pjb.172.1666896898657; Thu, 27 Oct 2022 11:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666896898; cv=none; d=google.com; s=arc-20160816; b=zgc1ghDJbAyiZVNlDXjKq2/4WWtF5Sg0UNDX/EhbGfFxWvzGZDUQfN7M0PmkUYOUXV KHEe+wNx/4AUijZRHYSq8S6I6DX+27XRGPQ8vrlO6Y8rIgILBWjNK9p/DY1XYb113k/k 5tqPlGhEwwo7Tx4uJHCsVmUnqqKg/AgRaog4gK1SZbvNhiUQswRftfuv5aRjoj0zrYQH 02DMEiu3D6cCXRE7M92ccFQhrpAiUAaLqV0On7o5JZmsSZaWP4vnwjM3Q6IIAfW2PIRF ZFTLiinq/BEBUoGFBlXUuq/ITq+R7BRUF+COqnHzqQMSd4uqvOFkIZKZf/kCgLFJqzod XNmA== 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=8svDBYxtD4uL/5EOyXTGdRu8D42UiDlFMmZ8sUmvEFk=; b=MK3GY0iOjCn7KEX8PQ/hZMb6GvA+79c4DyQ3dvRat2JsIVAPKpM5JpP4vdgAiJvud6 fJR0lRptHOikwh1ovxVhPGmvTS3rYkfmGtACRmapvJzCqqV53xhmMYx7ricFv+r+GfMJ QrPSdvOm2zUFrHT91DifZ8xcoBr6Pvg8ySpJfzE5D+5QtRYbpc8KRKu0UrjiuAdQay0n rawo48aggAgD8AFukIIYm0/i+JmIF6t5ZwGVit4GcosIHwRWX7h6dx2Qs72Eyd657eCU 84SzgeNzXqAPlEDLwJydGk+tCeKzgGhg7vhQxdb37dGUWq2o32ZnbcDoke1FJFWarXfr Ya6A== 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 n19-20020a170903405300b00186f1c070fesi1212097pla.181.2022.10.27.11.54.46; Thu, 27 Oct 2022 11:54:58 -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 S233548AbiJ0Swe (ORCPT + 99 others); Thu, 27 Oct 2022 14:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235600AbiJ0Swd (ORCPT ); Thu, 27 Oct 2022 14:52:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFBE355C7A for ; Thu, 27 Oct 2022 11:52:32 -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 ams.source.kernel.org (Postfix) with ESMTPS id 72B11B82770 for ; Thu, 27 Oct 2022 18:52:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1CE0C433C1; Thu, 27 Oct 2022 18:52:29 +0000 (UTC) Subject: [PATCH v6 08/14] NFSD: Update file_hashtbl() helpers From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: neilb@suse.de, jlayton@redhat.com Date: Thu, 27 Oct 2022 14:52:29 -0400 Message-ID: <166689674903.90991.7212713740272677313.stgit@klimt.1015granger.net> In-Reply-To: <166689625728.90991.15067635142973595248.stgit@klimt.1015granger.net> References: <166689625728.90991.15067635142973595248.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 --- 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;