Whamcloud - gitweb
LU-13088 ldlm: Fix sleeping function called in atomic 83/39283/3
authorMr NeilBrown <neilb@suse.de>
Thu, 19 Dec 2019 05:55:35 +0000 (16:55 +1100)
committerOleg Drokin <green@whamcloud.com>
Fri, 7 Aug 2020 21:12:15 +0000 (21:12 +0000)
commit8506d320af48aa16dab1c60d1ff134af17040ffc
treeab47e7c03e49ee1141c9d065c0bc585982ecbdbb
parent475f891305d48328d6ac101d6daf653193d62f5f
LU-13088 ldlm: Fix sleeping function called in atomic

target_recovery_overseer() can sleep while holding a spinlock, which
triggers a BUG warning.

It is easily fixed by dropping the spinlock before waiting.  In the
case where the task waits, no useful information that could be
protected by the spinlock is held, so nothing can be lost by dropping
it.

Lustre-change: https://review.whamcloud.com/#/c/37063/
Lustre-commit: b29b9310dafe17ba78e1db490b79b89d2d6fdcd1

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I8bb3d02523b5dcfadac19f01ccb736d7b7f28239
Reviewed-on: https://review.whamcloud.com/37063
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/39283
lustre/ldlm/ldlm_lib.c