diff mbox series

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

Message ID 1681739243-29375-15-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS branch April 17, 2023 | expand

Commit Message

James Simmons April 17, 2023, 1:47 p.m. UTC
From: Bobi Jam <bobijam@whamcloud.com>

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 <bobijam@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49339
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/ldlm/ldlm_resource.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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. */