diff options
| author | Sebastien Buisson <[email protected]> | 2016-10-27 18:12:00 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-10-30 11:02:33 -0400 |
| commit | bbadab80d2cb1908705d32b1689fe5cb5a32faab (patch) | |
| tree | 7249d927b68d6dcf4d29323c6cfd203a684430b5 | |
| parent | 539ff1393293d8d1060f1ef856868253fa7ac458 (diff) | |
staging: lustre: ptlrpc: do not switch out-of-date context
When trying to replace a dead sec context with a new one, we must
ensure the new context is already up-to-date.
If it is not the case, just return from sptlrpc_req_replace_dead_ctx()
and come later when the new context has been updated.
Signed-off-by: Sebastien Buisson <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6536
Reviewed-on: http://review.whamcloud.com/15708
Reviewed-by: Mike Pershin <[email protected]>
Reviewed-by: John L. Hammond <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/sec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 12f02ed6a91d..e860df7c45a2 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -515,6 +515,13 @@ static int sptlrpc_req_replace_dead_ctx(struct ptlrpc_request *req) set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(MSEC_PER_SEC)); + } else if (unlikely(!test_bit(PTLRPC_CTX_UPTODATE_BIT, &newctx->cc_flags))) { + /* + * new ctx not up to date yet + */ + CDEBUG(D_SEC, + "ctx (%p, fl %lx) doesn't switch, not up to date yet\n", + newctx, newctx->cc_flags); } else { /* * it's possible newctx == oldctx if we're switching |