Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp766507imw; Thu, 14 Jul 2022 10:21:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s7xCbCwBQIu6xRuPaBxGn97puYENiFJ1gWmIZmoc2FSZHdVCg07m09H4snuKm5AIRuhUQN X-Received: by 2002:a63:6c06:0:b0:419:ab8e:e177 with SMTP id h6-20020a636c06000000b00419ab8ee177mr5009563pgc.188.1657819276975; Thu, 14 Jul 2022 10:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657819276; cv=none; d=google.com; s=arc-20160816; b=MiL6oaRc+uY2cqZk+LRFIT1Ibz6BESezGnSL7jsSmgKz60Di6HEor8YKvYRL7MSJAM wHPk0/ipv9cVPAmrpiGaFLfBEzh5VeUkYbmubKIKU00sOB+TgzcBgFt6x8Kvgjx9V5Ix n+jxBZqnX9gkeKNnuTUK2eeuX1Yckt0JlpWTzy1Hxl6ZryBIHurnvddr72SrtAIVHgcO zHzcIgXC+ybO8XTjyZdo0g6EH4GRnFvztaxUFXecpgQn91AW/txGLOMJ6DlV5QbEI3E9 ABZOsVEOHxQyB/Kn+yKmJ9oy9+rGewh9rKgBq3+kf97zb1qYz36TQRgyiqP5CyoTp/J0 25tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=cUymxAztRHIAipJsRZNy5IOVITaJicS5A073WTqtgCI=; b=RKiq/Xr4AdUu+8lpOmWhZo/Bc9WC0tsuoLP58SK4B7Acdjm7TcSbO8472u325Uo3EZ ixfTJ5oAuDfGHy/rlam/UX7N76CBxwEpQoHRsMHH87Ej+YysxgJh8DIQYIOCRihfBiPA K7l3orAV0bi4spKqW3nrT3AB9nlCKIljONWBS+lmfhk61Yg+8Xkf+Wf8ofXrJ5UhllRG GETSfspJZdbI5v5qIBQWrQRNe/ZJLQRqOCw6P1mYiM/PHOdMvw1b7q2kvrYI15n0KMsN m6PXhSGD6Ur2Pr1Cawn9qBlZ5Is+7yfF9WqHTFkzmQu7gulGqeQ3TlEDhgwg0ZBvmp90 GqAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tP2fqBRH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a63f109000000b00415f03f3067si2418618pgi.46.2022.07.14.10.20.59; Thu, 14 Jul 2022 10:21:16 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tP2fqBRH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232592AbiGNRMM (ORCPT + 99 others); Thu, 14 Jul 2022 13:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240090AbiGNRML (ORCPT ); Thu, 14 Jul 2022 13:12:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BCD54BD28 for ; Thu, 14 Jul 2022 10:12:10 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4208F60ED8 for ; Thu, 14 Jul 2022 17:12:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D070C3411C; Thu, 14 Jul 2022 17:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657818729; bh=/XDrlvqWoivhow/w83LmkkNzWW5MxReQJ6MN2IZq6sY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=tP2fqBRHRqRYMu7ThRGaK04aOaPJDw4zMr3nzodhRfpc8Er0lKn5v5kN+CkhTnQDO EP/yq7VQ/v4ZH/b3XWBV9x9R/RmvnF8533KWe1YEWyJPdNWXtEh33XLmCPCwa5/XAG O8APGTDRcmRrU7GD0VOg9TezYJoUSWiYwPOOsv+W2u2RTCJ4ZPy87MU4yqI+WQGKI8 goadeNrh68+ChotIygcstmsJOAF8ph59ZdLFLlzqvfBewKOw21GvWL9fHV4nlFbjLv g2GbUyjIR7aFQkXS3SYZ23DapTNZdiiWlaQa6+ixNSbr9xlQsMrIITeUTogUsdjRRd bgAADsLCh7+xQ== Message-ID: <476892362c94debad589af79ff7d6766f5ca8c85.camel@kernel.org> Subject: Re: [RFC PATCH 2/3] nfsd: rework arguments to nfs4_set_delegation From: Jeff Layton To: Chuck Lever III Cc: Neil Brown , Linux NFS Mailing List Date: Thu, 14 Jul 2022 13:12:08 -0400 In-Reply-To: References: <20220714152819.128276-1-jlayton@kernel.org> <20220714152819.128276-3-jlayton@kernel.org> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 (3.44.3-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, 2022-07-14 at 16:47 +0000, Chuck Lever III wrote: >=20 > > On Jul 14, 2022, at 11:28 AM, Jeff Layton wrote: > >=20 > > We'll need the nfs4_open to vet the filename. Change nfs4_set_delegatio= n > > to take the same arguments are nfs4_open_delegation. >=20 > ^are^as >=20 > Nit: Considering that in the next patch you change the synopsis of > nfs4_open_delegation again but not nfs4_set_delegation, this > description causes a little whiplash. >=20 >=20 Yeah, I should have squashed a couple of those together. I _did_ say it was an RFC. I can resend a cleaned-up version later if you want to take this in. > > Signed-off-by: Jeff Layton > > --- > > fs/nfsd/nfs4state.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > >=20 > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > > index 4f81c0bbd27b..347794028c98 100644 > > --- a/fs/nfsd/nfs4state.c > > +++ b/fs/nfsd/nfs4state.c > > @@ -5260,10 +5260,12 @@ static int nfsd4_check_conflicting_opens(struct= nfs4_client *clp, > > } > >=20 > > static struct nfs4_delegation * > > -nfs4_set_delegation(struct nfs4_client *clp, > > - struct nfs4_file *fp, struct nfs4_clnt_odstate *odstate) > > +nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *s= tp) > > { > > int status =3D 0; > > + struct nfs4_client *clp =3D stp->st_stid.sc_client; > > + struct nfs4_file *fp =3D stp->st_stid.sc_file; > > + struct nfs4_clnt_odstate *odstate =3D stp->st_clnt_odstate; > > struct nfs4_delegation *dp; > > struct nfsd_file *nf; > > struct file_lock *fl; > > @@ -5405,7 +5407,7 @@ nfs4_open_delegation(struct nfsd4_open *open, str= uct nfs4_ol_stateid *stp) > > default: > > goto out_no_deleg; > > } > > - dp =3D nfs4_set_delegation(clp, stp->st_stid.sc_file, stp->st_clnt_od= state); > > + dp =3D nfs4_set_delegation(open, stp); > > if (IS_ERR(dp)) > > goto out_no_deleg; > >=20 > > --=20 > > 2.36.1 > >=20 >=20 > -- > Chuck Lever >=20 >=20 >=20 --=20 Jeff Layton