Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp594153pxb; Thu, 21 Jan 2021 15:01:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/dO+fT6r8u9dTV7JV3US5UiTO/+Eobq+E6FqX+E6jWz94UYPHpNX1yP7ZQ8+TSgNeezn9 X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr1136838edc.174.1611270082662; Thu, 21 Jan 2021 15:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611270082; cv=none; d=google.com; s=arc-20160816; b=sqGfa+oLbu+xzlimW8heYAMsG4Ks84LJqUB1twwkUx+gTTc/7ROFH04DPyixHy9v3o oNmfunCIqvdAC9SA7Vhzwup0LIOHN9PQxFfqv6OKb37P6+9FdgHMNgSnQBGi0PiI1uHx jGbf5KB1MLE9o5PEgQ+FEvjmY3eCx5d9vcS8Ft66TdktxAR5cO0sOaMcQR0cxeQP19N6 pQ3ewVN9pRFK/1Ok+Uev8q+RLlU+T/TS6tuh62zVy/I2wiVr43TRgf+SvPULqWlOKZ3L qg5GfY2bLsvRNDiv93wsPaXv9nVJQYXlzZdvH9RESn7K7/kBhNkr+vgwJr0yHJkmHqYN QaoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-filter; bh=9o94J/bos/kMU0LQw5812tqv8OVlPJ/flmQMSEJ8r/U=; b=Ff8RjFw0bEBG/GqCqbAt797Pu5LP5HkNa2/xhckq+8/p1iThEyMG1om4BBK8tjYvjU ow3blcm/3zYnMpqRS20EpQG60A/qRLvEoFtI6SNvBed3eBTArzCD1i/KLwTwSlQYEmLh LO+I2WYIXJEU14Tw0glgJsnnMFQG2iRaZc2bxR1nrbFftGayzxNQ4Z0E5QAq8hLQZY/y gQLyqjtvm/F4xZjKhTyw6W5hCAPq3BVuKNWdV+PX3FY7tC72Nsu8SjqAV4AnAtR9d9KF 7kF8O5tkZvuVrzPErrQSRap8guMs7oxwIDcFbosW0J12/0g3OMDgsFFE/n70iHT7IeLX 8kNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr2si2204331ejc.663.2021.01.21.15.00.58; Thu, 21 Jan 2021 15:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727014AbhAUW7a (ORCPT + 99 others); Thu, 21 Jan 2021 17:59:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbhAUW7F (ORCPT ); Thu, 21 Jan 2021 17:59:05 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46F46C061351 for ; Thu, 21 Jan 2021 14:57:48 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id D1DF36EF5; Thu, 21 Jan 2021 17:57:46 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org D1DF36EF5 From: "J. Bruce Fields" To: Chuck Lever Cc: linux-nfs@vger.kernel.org, "J. Bruce Fields" Subject: [PATCH v3 4/9] nfsd: rename lookup_clientid->set_client Date: Thu, 21 Jan 2021 17:57:40 -0500 Message-Id: <1611269865-30153-4-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1611269865-30153-1-git-send-email-bfields@redhat.com> References: <20210121204251.GB13298@pick.fieldses.org> <1611269865-30153-1-git-send-email-bfields@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: "J. Bruce Fields" I think this is a better name, and I'm going to reuse elsewhere the code that does the lookup itself. Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4state.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index ba955bbf21df..4bdd90074e24 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4633,7 +4633,7 @@ static __be32 nfsd4_check_seqid(struct nfsd4_compound_state *cstate, struct nfs4 return nfserr_bad_seqid; } -static __be32 lookup_clientid(clientid_t *clid, +static __be32 set_client(clientid_t *clid, struct nfsd4_compound_state *cstate, struct nfsd_net *nn, bool sessions) @@ -4688,7 +4688,7 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate, if (open->op_file == NULL) return nfserr_jukebox; - status = lookup_clientid(clientid, cstate, nn, false); + status = set_client(clientid, cstate, nn, false); if (status) return status; clp = cstate->clp; @@ -5298,7 +5298,7 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); trace_nfsd_clid_renew(clid); - status = lookup_clientid(clid, cstate, nn, false); + status = set_client(clid, cstate, nn, false); if (status) return status; clp = cstate->clp; @@ -5681,8 +5681,7 @@ nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate, if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) || CLOSE_STATEID(stateid)) return nfserr_bad_stateid; - status = lookup_clientid(&stateid->si_opaque.so_clid, cstate, nn, - false); + status = set_client(&stateid->si_opaque.so_clid, cstate, nn, false); if (status == nfserr_stale_clientid) { if (cstate->session) return nfserr_bad_stateid; @@ -5821,7 +5820,7 @@ static __be32 find_cpntf_state(struct nfsd_net *nn, stateid_t *st, cps->cpntf_time = ktime_get_boottime_seconds(); memset(&cstate, 0, sizeof(cstate)); - status = lookup_clientid(&cps->cp_p_clid, &cstate, nn, true); + status = set_client(&cps->cp_p_clid, &cstate, nn, true); if (status) goto out; status = nfsd4_lookup_stateid(&cstate, &cps->cp_p_stateid, @@ -6900,8 +6899,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, return nfserr_inval; if (!nfsd4_has_session(cstate)) { - status = lookup_clientid(&lockt->lt_clientid, cstate, nn, - false); + status = set_client(&lockt->lt_clientid, cstate, nn, false); if (status) goto out; } @@ -7085,7 +7083,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp, dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n", clid->cl_boot, clid->cl_id); - status = lookup_clientid(clid, cstate, nn, false); + status = set_client(clid, cstate, nn, false); if (status) return status; @@ -7232,7 +7230,7 @@ nfs4_check_open_reclaim(clientid_t *clid, __be32 status; /* find clientid in conf_id_hashtbl */ - status = lookup_clientid(clid, cstate, nn, false); + status = set_client(clid, cstate, nn, false); if (status) return nfserr_reclaim_bad; -- 2.29.2