Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7600825rwi; Mon, 24 Oct 2022 17:27:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UGoUnswTM0hbLNrGPiHAkuIQfpb9mJOkNAoNjv7KTTailDrP/Li44kapeAK69J2gyWuHV X-Received: by 2002:a17:907:805:b0:782:1a0d:337f with SMTP id wv5-20020a170907080500b007821a0d337fmr30344451ejb.475.1666657675165; Mon, 24 Oct 2022 17:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666657675; cv=none; d=google.com; s=arc-20160816; b=iTosBtwsb5YydCld9vrFFVD+5F+LlAVZhmc1QORTNIgQ58Zr7GVsOfqT3IMhJ11rU8 eW9+cxt82TpQcoY09rkPJ7SZmuu1qA8pbxqBnxBSAyJX8ELIdn507GjS2qCeFAA80xji Wys1u1aWHofUf7zTiYCet+45xbl3qiLTtXbHmDd0det0EJ3PkZB76xablvYDQuJg9jRk JUqLHobmAFCYf/s0qMh+m/g4p/TAhWIzHJ+P/9itAmf5NjRXE0By2q0gKId/4muE6V2v R3ze6wz2tB+QyOEuUCKqr83yuSs8/taa2b5UIDTpjecHv9ndd3tZ3QNh6MrZdRkkMB4t kffA== 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=XM/MkPwBztFffuEawqzDnV2J1Vkv4OYsuFHgCv4CFtE=; b=BUCYWjOuRc65x9MoY/8hl9oOX36LITdD8Yid13zuSxaxlIZrPES0+38Xw1IMz0cQKc RnfS2quVqOHv9UjDjAnArUW6w7Mff3PLTFIj5sdVOb8R3momL2BaPridBNESRN9q8drG J0ISEtsYuZZ2lw/g3LHtrJCJ9Rg3FYpAd5YJTpgpGNS3uL0VyqnKt0kwyWc0S3afgX2d CCRTNmTcgIW7bS8x+dV42ah4fiARZDBcVJyL/tkYbdFwkuXqZZNSBMGuEGrcp8NWqm55 ORE4GhF6pcPDi4QKiWK9usGuoq1VLqYq/q887QrGUdXKkG1NqVunzVUHDwVxZWPx5ngu Vt7g== 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 h10-20020a056402280a00b00451e1aae675si1377782ede.547.2022.10.24.17.27.30; Mon, 24 Oct 2022 17:27:55 -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 S230236AbiJYASC (ORCPT + 99 others); Mon, 24 Oct 2022 20:18:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbiJYARp (ORCPT ); Mon, 24 Oct 2022 20:17:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 059F7915FE for ; Mon, 24 Oct 2022 15:37:41 -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 B3BCBB810B2 for ; Mon, 24 Oct 2022 22:37:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47F58C433D6; Mon, 24 Oct 2022 22:37:38 +0000 (UTC) Subject: [PATCH v5 07/13] NFSD: Update file_hashtbl() helpers From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: neilb@suse.de Date: Mon, 24 Oct 2022 18:37:37 -0400 Message-ID: <166665105737.50761.10180321804226640809.stgit@klimt.1015granger.net> In-Reply-To: <166664935937.50761.7812494396457965637.stgit@klimt.1015granger.net> References: <166664935937.50761.7812494396457965637.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 db58d5c0bba8..90c991e500a8 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;