[lustre-devel] [PATCH 057/622] lustre: ldlm: don't add canceling lock back to LRU
James Simmons
jsimmons at infradead.org
Thu Feb 27 13:08:45 PST 2020
From: Mikhail Pershin <mpershin at whamcloud.com>
When lock is converted check it is not canceling before
adding it back to LRU.
Lustre-commit: ad52f394bd82 ("LU-11003 ldlm: don't add canceling lock back to LRU")
Signed-off-by: Mikhail Pershin <mpershin at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32692
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: John L. Hammond <jhammond at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/ldlm/ldlm_request.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/lustre/ldlm/ldlm_request.c b/fs/lustre/ldlm/ldlm_request.c
index ad54bd2..bc441f0 100644
--- a/fs/lustre/ldlm/ldlm_request.c
+++ b/fs/lustre/ldlm/ldlm_request.c
@@ -893,7 +893,8 @@ static int lock_convert_interpret(const struct lu_env *env,
* is not there yet.
*/
lock->l_policy_data.l_inodebits.cancel_bits = 0;
- if (!lock->l_readers && !lock->l_writers) {
+ if (!lock->l_readers && !lock->l_writers &&
+ !ldlm_is_canceling(lock)) {
spin_lock(&ns->ns_lock);
/* there is check for list_empty() inside */
ldlm_lock_remove_from_lru_nolock(lock);
--
1.8.3.1
More information about the lustre-devel
mailing list