[lustre-devel] [PATCH 1/7] lustre: ptlrpc: unregister reply buffer on rq_err

James Simmons jsimmons at infradead.org
Mon Apr 18 17:30:58 PDT 2022

From: Alexander Zarochentsev <alexander.zarochentsev at hpe.com>

Unregister reply buffer on rq_err and prevent a late reply from
modifying request flags in INTERPRET state.

HPE-bug-id: LUS-10717
Fixes: b06c1d17e488 ("lustre: mgc: do not ignore target registration failure")
WC-bug-id: https://jira.whamcloud.com/browse/LU-15435
Lustre-commit: d8012811cc6ff9c7f ("LU-15435 ptlrpc: unregister reply buffer on rq_err")
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev at hpe.com>
Signed-off-by: Alexey Lyashkov <alexey.lyashkov at hpe.com>
Reviewed-on: https://review.whamcloud.com/46132
Reviewed-by: Alexander Boyko <alexander.boyko at hpe.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
 fs/lustre/ptlrpc/client.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/lustre/ptlrpc/client.c b/fs/lustre/ptlrpc/client.c
index ec0cd5f..685d6e2 100644
--- a/fs/lustre/ptlrpc/client.c
+++ b/fs/lustre/ptlrpc/client.c
@@ -1857,6 +1857,11 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 		if (req->rq_err) {
+			if (!ptlrpc_unregister_reply(req, 1)) {
+				ptlrpc_unregister_bulk(req, 1);
+				continue;
+			}
 			req->rq_replied = 0;

More information about the lustre-devel mailing list