summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-12-20 21:36:37 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-01-22 20:25:25 -0500
commit513e29946ab22f66cd14670024f6c98b5b913462 (patch)
treec08fbb216c552524f539331582205fd76fa56d55 /tools/perf/scripts/python/bin
parenta97451ac1e34df5df591c9910b78c84f51f2ec1e (diff)
downloadcachepc-linux-513e29946ab22f66cd14670024f6c98b5b913462.tar.gz
cachepc-linux-513e29946ab22f66cd14670024f6c98b5b913462.zip
scsi: target: core: Replace in_interrupt() usage in target_submit_cmd_map_sgls()
target_submit_cmd_map_sgls() uses in_interrupt() to crash if it returns true. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The usage of in_interrupt() is clearly for debugging. might_sleep() is better at this because it also detects other contexts in which it is not allowed to sleep, like preempt-disabled section. Replace BUG_ON(in_interrupt) with might_sleep(). Link: https://lore.kernel.org/r/20201220203638.43615-6-bigeasy@linutronix.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions