From nobody Sun Feb 8 13:27:24 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6450034F244; Tue, 13 Jan 2026 18:37:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768329471; cv=none; b=dpm8YdtR+my5//Rd0EP7Bnjoa+FeJCx6rMOlqw/0r+yexYCV8rzn05cavGyOhhNAnxwexDV2UvCITnT2g8Jwf8gCH2a/MZ9wMVofcVK/Z6awUlwAQWz/70qiz+fOfckkbtE0u6kv9jYlbndSvr/28CZLiqlVflLY7xwLEibywgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768329471; c=relaxed/simple; bh=ceY4Hl7QOvn87D3m3WbtQvOB4ywUgRMbZQ9ZzJ2YjwU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TofLvaCJAb64GSAsE98z8uMv5fAZNRVLgGVzyLMa0FHmePIxYdc53UvNdUedAgKXUqthPpaqgeEOb36IWXM2geSnyVp4qba7YqSqTARrs+zq+xStSHeroqtVQ5g6Q64U+2+Z166GOINWDGFl0cj7vp3+Is0XQQ9F3r14Evcxehs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kFgt7F87; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kFgt7F87" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26FFAC19422; Tue, 13 Jan 2026 18:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768329471; bh=ceY4Hl7QOvn87D3m3WbtQvOB4ywUgRMbZQ9ZzJ2YjwU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kFgt7F87A6tkzO39egAFh1KPqsisEt7DwBZ5qe3+mW0ds9BJEz60p3BpNYtcQs3y2 /iJzoTN6F1047M4iUw7AdQw6ur1WVxgaCatt68UO81zaI1KNdooyIFg7pRp5sdtzl9 Zt8zZRRTUgYqBLRBx3DaPM41G6PVOaOD5OSWtyj+qzZCYeBbBRjZAVbnUgBCqPyHNr RUARuTlJxr9M1uDr6SujbyahDrT6QY3s1VbOj8K3pTCnzBTaux+Nw0XCGnYylXnZD5 igaSEklSuR6HUd2p1lNXAWoGmmc4VL89gy7hQFyElj4Pf62rm4jDTMnl3wML7JRIVY 1npVY+vxrhyLg== From: Jeff Layton Date: Tue, 13 Jan 2026 13:37:39 -0500 Subject: [PATCH 1/2] nfsd/sunrpc: add svc_rqst->rq_private pointer and remove rq_lease_breaker Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-rq_private-v1-1-88ed308364e6@kernel.org> References: <20260113-rq_private-v1-0-88ed308364e6@kernel.org> In-Reply-To: <20260113-rq_private-v1-0-88ed308364e6@kernel.org> To: Chuck Lever , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker Cc: Ben Coddington , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5650; i=jlayton@kernel.org; h=from:subject:message-id; bh=ceY4Hl7QOvn87D3m3WbtQvOB4ywUgRMbZQ9ZzJ2YjwU=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBpZpD8Y1MWqHC/k0e08gg0r9DWubqQtpyXMufUP Me3WHNv6DeJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaWaQ/AAKCRAADmhBGVaC FUjmD/0Ud83VQeI9dz1vZL2TN1IQshS62ymvCfkil9yxqpaqE9kFytX0dR3hM+f48OqjD8rsjmO yGjddq93DEkawqqCfk7Da0jYyh1HrMKAti1/ZtDTHXO1SjKw5nNlagEewv2DGMFJdhevAdTgwmB N30/We5v/TlPzfetRF+u6w00UHaORytrH/MG2REUJLYyUCauaJclbSUoKb+MTWlLsEE37HyQRx0 K55J0aS3KxD/NRyciEnsa2dw//aYEMYdNDVz3yM+GGRXZ+KB7JI+bBvYL6plz90QdA7ycBu9z+s ZDPYucLmGfv7yNgJuElJ6LYnzwDaEegyPiL0zG6tBoD2J2Ji2C1B/CSYxZU888O8QYk6MXjQ2tH xkgOSqjEFCJJyfoZlCawliRffyAaEfgI4CoyxhwSOLJy936T0IS7cdcldoLRZVqw/2gJsdNxCig XE0KEmcvUDXuc13liDvCn4616bQ8HfjD0LX9LuHrJla9A83Xo5O+VSdNxixNCi8e6V4PFot18KW TnvZTcX5NRyQaTH4KbokPnt3eIuohDlm3Lphd4S0NAOO94Wv8RHe/LpMRFnumpn6hErjHW2R5Bl jmXQs0ZL0FbfPJ2d9Bf5tuldNplt/qBDPm0CRrsgpe/DXF+lys9gnviE0WrlPGq2NCCapY7ORnZ rDAWwEBdKOvOvFQ== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 rq_lease_breaker has always been a NFSv4 specific layering violation in svc_rqst. The reason it's there though is that we need a place that is thread-local, and accessible from the svc_rqst pointer. Add a new rq_private pointer to struct svc_rqst. This is intended for use by the threads that are handling the service. sunrpc code doesn't touch it. In nfsd, define a new struct nfsd_thread_local_info. nfsd declares one of these on the stack and puts a pointer to it in rq_private. Add a new ntli_lease_breaker field to the new struct and convert all of the places that access rq_lease_breaker to use the new field instead. Signed-off-by: Jeff Layton Reviewed-by: Benjamin Coddington --- fs/nfsd/nfs4proc.c | 3 ++- fs/nfsd/nfs4state.c | 9 ++++++--- fs/nfsd/nfsd.h | 4 ++++ fs/nfsd/nfssvc.c | 3 +++ include/linux/sunrpc/svc.h | 5 ++++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index d476d108f6e107ad5310e4ea504daabd750cf450..5c30ea99daad2825ba62fefc456= a6d2cc41b6063 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -3038,6 +3038,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp) struct svc_fh *current_fh =3D &cstate->current_fh; struct svc_fh *save_fh =3D &cstate->save_fh; struct nfsd_net *nn =3D net_generic(SVC_NET(rqstp), nfsd_net_id); + struct nfsd_thread_local_info *ntli =3D rqstp->rq_private; __be32 status; =20 resp->xdr =3D &rqstp->rq_res_stream; @@ -3076,7 +3077,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp) } check_if_stalefh_allowed(args); =20 - rqstp->rq_lease_breaker =3D (void **)&cstate->clp; + ntli->ntli_lease_breaker =3D &cstate->clp; =20 trace_nfsd_compound(rqstp, args->tag, args->taglen, args->client_opcnt); while (!status && resp->opcnt < args->opcnt) { diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index af2b307ac78cf3733a173f9024aced87fe94603f..583c13b5aaf3cd12a87c7aae62f= e6a8223368f55 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5542,13 +5542,15 @@ nfsd_break_deleg_cb(struct file_lease *fl) static bool nfsd_breaker_owns_lease(struct file_lease *fl) { struct nfs4_delegation *dl =3D fl->c.flc_owner; + struct nfsd_thread_local_info *ntli; struct svc_rqst *rqst; struct nfs4_client *clp; =20 rqst =3D nfsd_current_rqst(); if (!nfsd_v4client(rqst)) return false; - clp =3D *(rqst->rq_lease_breaker); + ntli =3D rqst->rq_private; + clp =3D *ntli->ntli_lease_breaker; return dl->dl_stid.sc_client =3D=3D clp; } =20 @@ -9360,13 +9362,14 @@ __be32 nfsd4_deleg_getattr_conflict(struct svc_rqst *rqstp, struct dentry *dentry, struct nfs4_delegation **pdp) { - __be32 status; struct nfsd_net *nn =3D net_generic(SVC_NET(rqstp), nfsd_net_id); + struct nfsd_thread_local_info *ntli =3D rqstp->rq_private; struct file_lock_context *ctx; struct nfs4_delegation *dp =3D NULL; struct file_lease *fl; struct nfs4_cb_fattr *ncf; struct inode *inode =3D d_inode(dentry); + __be32 status; =20 ctx =3D locks_inode_context(inode); if (!ctx) @@ -9387,7 +9390,7 @@ nfsd4_deleg_getattr_conflict(struct svc_rqst *rqstp, = struct dentry *dentry, break; } if (dp =3D=3D NULL || dp =3D=3D NON_NFSD_LEASE || - dp->dl_recall.cb_clp =3D=3D *(rqstp->rq_lease_breaker)) { + dp->dl_recall.cb_clp =3D=3D *(ntli->ntli_lease_breaker)) { spin_unlock(&ctx->flc_lock); if (dp =3D=3D NON_NFSD_LEASE) { status =3D nfserrno(nfsd_open_break_lease(inode, diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index a01d709533585f09df1399b85eecc36ea7c466c5..938906c6d10cd65e7e3a1bc889b= 4fdcb56918f6f 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h @@ -82,6 +82,10 @@ extern atomic_t nfsd_th_cnt; /* number of available t= hreads */ =20 extern const struct seq_operations nfs_exports_op; =20 +struct nfsd_thread_local_info { + struct nfs4_client **ntli_lease_breaker; +}; + /* * Common void argument and result helpers */ diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index eee8c3f4a251a3fae6e41679de0ec34c76caf198..8ce366c9e49220e8baf475c2e5f= 3424fedc1cec1 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -900,6 +900,7 @@ nfsd(void *vrqstp) struct svc_xprt *perm_sock =3D list_entry(rqstp->rq_server->sv_permsocks.= next, typeof(struct svc_xprt), xpt_list); struct net *net =3D perm_sock->xpt_net; struct nfsd_net *nn =3D net_generic(net, nfsd_net_id); + struct nfsd_thread_local_info ntli =3D { }; bool have_mutex =3D false; =20 /* At this point, the thread shares current->fs @@ -914,6 +915,8 @@ nfsd(void *vrqstp) =20 set_freezable(); =20 + rqstp->rq_private =3D &ntli; + /* * The main request loop */ diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 4dc14c7a711b010473bf03fc401df0e66d9aa4bd..ab8237ba9596e9f31e2c42abede= c435a23162b40 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -175,6 +175,9 @@ static inline unsigned long svc_serv_maxpages(const str= uct svc_serv *serv) /* * The context of a single thread, including the request currently being * processed. + * + * RPC programs are free to use rq_private to stash thread-local informati= on. + * The sunrpc layer will not access it. */ struct svc_rqst { struct list_head rq_all; /* all threads list */ @@ -251,7 +254,7 @@ struct svc_rqst { unsigned long bc_to_initval; unsigned int bc_to_retries; unsigned int rq_status_counter; /* RPC processing counter */ - void **rq_lease_breaker; /* The v4 client breaking a lease */ + void *rq_private; /* For use by the service thread */ }; =20 /* bits for rq_flags */ --=20 2.52.0 From nobody Sun Feb 8 13:27:24 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B814934EF08; Tue, 13 Jan 2026 18:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768329474; cv=none; b=t4XCqFGf0qqfTMne5NYsVMMj662YSswih2o9dZXkRpvPWYXWBddIifioJtaKVmDeLhFGmeTuCBtUIsUJ5/Ccs8VyFEYi4DrGm2kUZgi37r4zPeVQvS1Gye46yPRUrxMfbKtUxCsw4klCp/iuabSqg4s/eWgeOIzaUy5Baa0llGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768329474; c=relaxed/simple; bh=q3DEc+IbL4zNDWLm0VRqoUmfXFlFslRgkIrNwTn/ISU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ukya6qmFEf+V6tS3YyUHbWMlwiUIicXHgxGb3vsGTfADuxBMrpsfge7LmWiDaHO8a4WBWdUSpzx70tj+yo5FVwaAIX34KT4Zw9+FBI8ZuHawnj3PC34/b1CtooWz+JRSQ2A3HI+8lBHBuQgJd/NYDqwewuAhb7vaf93Nu9PoWdk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=riYppCrS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="riYppCrS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66102C19423; Tue, 13 Jan 2026 18:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768329472; bh=q3DEc+IbL4zNDWLm0VRqoUmfXFlFslRgkIrNwTn/ISU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=riYppCrSppQkRxvPscyxwBIVBU6nCC0TKlGpd3/PBp4Gc1dZ4AGKzg54D9Qu2ReVK xE7KUs0ntEuAO61BjGQ+6aeCvNeU51ZMjdrdT19TkhVwABlMnZQxxgltatyIP66I8/ 9M+T/gKxuN9TNnEpGDJ2E11NRqZK7+OQJVg55zJBNQ7iX2jewB01ty6qzhkkHB0hS+ 4VK1jI+eCe8BHz0v/kWBJ14Y89dPzFR+YIZ/V4gqKaXZUUt6Aj4HU65HyoXgYSZ4ZT 98h70305Ra/iax4UNd+d5cfKZwHgO1H6FH8ESVClp80fyswXDadyamXUKbJlisENLF IzP1b3m/N0pPA== From: Jeff Layton Date: Tue, 13 Jan 2026 13:37:40 -0500 Subject: [PATCH 2/2] nfsd/sunrpc: move rq_cachetype into struct nfsd_thread_local_info Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-rq_private-v1-2-88ed308364e6@kernel.org> References: <20260113-rq_private-v1-0-88ed308364e6@kernel.org> In-Reply-To: <20260113-rq_private-v1-0-88ed308364e6@kernel.org> To: Chuck Lever , NeilBrown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker Cc: Ben Coddington , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Layton X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4122; i=jlayton@kernel.org; h=from:subject:message-id; bh=q3DEc+IbL4zNDWLm0VRqoUmfXFlFslRgkIrNwTn/ISU=; b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBpZpD8vXOprTcVD+rsBCO157VjC7HpzKOv7ocBU qkr6rjv24KJAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaWaQ/AAKCRAADmhBGVaC FfNGEACxoR5kW/Mzhe2MSKWl0US1YpbOQ7/jVygklDChvjsuUPQnFzy5eu8vMcKDuLozAu4k71s YmF8KVqT4scX/CZKALdwuZ6cIfEUMCPVlEEQm6QQKosYBgiL15A6p76SFJSvu1/FExKeNbE3V9n a77XgFAAZTl/VCCQr96H8WIWUKXmSNztUIiDbaAUL3kLYOAbMrI0KqhT7yHbATSz5PeZuY4x8MQ oZjzWBw2/UGtA+46IWcsLyGHdULFPLYBKaySxXtb8kB09yPX271ONXMTOny4DP+hxrKTQzK8kp3 LYQ+/GFjfDvT17P11ix4/l0bsHuRTAZQs7oLJBzRZBen90F5rKZVqLz198umu26pteRAxxeVmtL B8ekhVK7RFcdUWjvNEIJ0MnSLlcIeZ91ucuRV+Hk+tyyTj2fJ5XeDscxdNoCtrE5vJYIdY/ObKN xudDV9PUFz+eFT1CB+Dl9E3kjHhkeM98Tjg5sdaHPxz+GgWg4CZaGAP46dci6WUYw7IfxT2koy9 SX6W8agMr9AJoZgErDMVLvTXYnGfnD+VzSxjVM+NxFhyoyoJsuKaY/+PHXuYaoodEtELbEDINJN 6sAI/VqZrpR/1e32RVu9HP0pVsSdRxzz5YW6xioGYJpydwNs1TfjLfPxzHl04UNR0iucfGagLqt stFP/N7XLBsT/rA== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 The svc_rqst->rq_cachetype field is only accessed by nfsd. Move it into the nfsd_thread_local_info instead. Signed-off-by: Jeff Layton Reviewed-by: Benjamin Coddington --- fs/nfsd/nfs4xdr.c | 3 ++- fs/nfsd/nfscache.c | 3 ++- fs/nfsd/nfsd.h | 1 + fs/nfsd/nfssvc.c | 5 +++-- include/linux/sunrpc/svc.h | 1 - 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 5172dbd0cb05956f8d5465e08fec93b5133ec55f..884b792c95a387fba24b6f54006= 3c90d7fc1f1b0 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2598,6 +2598,7 @@ nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp,= struct nfsd4_op *op) static bool nfsd4_decode_compound(struct nfsd4_compoundargs *argp) { + struct nfsd_thread_local_info *ntli =3D argp->rqstp->rq_private; struct nfsd4_op *op; bool cachethis =3D false; int auth_slack=3D argp->rqstp->rq_auth_slack; @@ -2690,7 +2691,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp) if (argp->minorversion) cachethis =3D false; svc_reserve_auth(argp->rqstp, max_reply + readbytes); - argp->rqstp->rq_cachetype =3D cachethis ? RC_REPLBUFF : RC_NOCACHE; + ntli->ntli_cachetype =3D cachethis ? RC_REPLBUFF : RC_NOCACHE; =20 argp->splice_ok =3D nfsd_read_splice_ok(argp->rqstp); if (readcount > 1 || max_reply > PAGE_SIZE - auth_slack) diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index ab13ee9c7fd8421ce6f66e3dc20d657b6442fbb8..154468ceccdc12dbeab3a1f1908= 6e8ac9d37a223 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -467,10 +467,11 @@ int nfsd_cache_lookup(struct svc_rqst *rqstp, unsigne= d int start, unsigned int len, struct nfsd_cacherep **cacherep) { struct nfsd_net *nn =3D net_generic(SVC_NET(rqstp), nfsd_net_id); + struct nfsd_thread_local_info *ntli =3D rqstp->rq_private; struct nfsd_cacherep *rp, *found; __wsum csum; struct nfsd_drc_bucket *b; - int type =3D rqstp->rq_cachetype; + int type =3D ntli->ntli_cachetype; LIST_HEAD(dispose); int rtn =3D RC_DOIT; =20 diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index 938906c6d10cd65e7e3a1bc889b4fdcb56918f6f..a2e35a4fa105380c2d99cb08650= 03e0f7f4a8e8d 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h @@ -84,6 +84,7 @@ extern const struct seq_operations nfs_exports_op; =20 struct nfsd_thread_local_info { struct nfs4_client **ntli_lease_breaker; + int ntli_cachetype; }; =20 /* diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 8ce366c9e49220e8baf475c2e5f3424fedc1cec1..294876910cf22b4271eb3b447d2= 3b63866fae179 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -983,6 +983,7 @@ nfsd(void *vrqstp) */ int nfsd_dispatch(struct svc_rqst *rqstp) { + struct nfsd_thread_local_info *ntli =3D rqstp->rq_private; const struct svc_procedure *proc =3D rqstp->rq_procinfo; __be32 *statp =3D rqstp->rq_accept_statp; struct nfsd_cacherep *rp; @@ -993,7 +994,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp) * Give the xdr decoder a chance to change this if it wants * (necessary in the NFSv4.0 compound case) */ - rqstp->rq_cachetype =3D proc->pc_cachetype; + ntli->ntli_cachetype =3D proc->pc_cachetype; =20 /* * ->pc_decode advances the argument stream past the NFS @@ -1038,7 +1039,7 @@ int nfsd_dispatch(struct svc_rqst *rqstp) */ smp_store_release(&rqstp->rq_status_counter, rqstp->rq_status_counter + 1= ); =20 - nfsd_cache_update(rqstp, rp, rqstp->rq_cachetype, nfs_reply); + nfsd_cache_update(rqstp, rp, ntli->ntli_cachetype, nfs_reply); out_cached_reply: return 1; =20 diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index ab8237ba9596e9f31e2c42abedec435a23162b40..62152e4f3bccee3e7d4d99ad08d= 6a50ca1252c1e 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -218,7 +218,6 @@ struct svc_rqst { u32 rq_vers; /* program version */ u32 rq_proc; /* procedure number */ u32 rq_prot; /* IP protocol */ - int rq_cachetype; /* catering to nfsd */ unsigned long rq_flags; /* flags field */ ktime_t rq_qtime; /* enqueue time */ =20 --=20 2.52.0