[lustre-devel] [PATCH 14/27] lustre: ldlm: clear lock converting flag on resource cleanup

James Simmons <[email protected]> Mon, 17 Apr 2023 09:47:10 -0400
Newsgroups org.lustre.lists.lustre-devel
Message-ID <[email protected]>
From: Bobi Jam <[email protected]>

During resource cleanup clear lock's converting flag so that
ldlm_cli_cancel() won't erroneously trip the assertion, the assertion
is used for normal lock revoke callbacks.

WC-bug-id: https://jira.whamcloud.com/browse/LU-16371
Lustre-commit: 4990f4ef5eb81d8017 ("LU-16371 ldlm: clear lock converting flag on resource cleanup")
Signed-off-by: Bobi Jam <[email protected]>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49339
Reviewed-by: Andreas Dilger <[email protected]>
Reviewed-by: Patrick Farrell <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
---
 fs/lustre/ldlm/ldlm_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/lustre/ldlm/ldlm_resource.c b/fs/lustre/ldlm/ldlm_resource.c
index 9a269cb..28f64b6 100644
--- a/fs/lustre/ldlm/ldlm_resource.c
+++ b/fs/lustre/ldlm/ldlm_resource.c
@@ -794,6 +794,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
 		 */
 		ldlm_set_cbpending(lock);
 		ldlm_set_failed(lock);
+		ldlm_clear_converting(lock);
 		lock->l_flags |= flags;
 
 		/* ... without sending a CANCEL message for local_only. */
-- 
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org