summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-08-25 18:41:24 +0200
committerThomas Gleixner <tglx@linutronix.de>2022-09-19 14:35:07 +0200
commit555bb4ccd1dd78d0263eae31629fe1fdd65c1fb5 (patch)
tree88891b9221198fa70d63dc7be7cfa38aa1475318 /fs/dcache.c
parent521a547ced6477c54b4b0cc206000406c221b4d6 (diff)
downloadlinux-555bb4ccd1dd78d0263eae31629fe1fdd65c1fb5.tar.gz
preempt: Provide preempt_[dis|en]able_nested()
On PREEMPT_RT enabled kernels, spinlocks and rwlocks are neither disabling preemption nor interrupts. Though there are a few places which depend on the implicit preemption/interrupt disable of those locks, e.g. seqcount write sections, per CPU statistics updates etc. To avoid sprinkling CONFIG_PREEMPT_RT conditionals all over the place, add preempt_disable_nested() and preempt_enable_nested() which should be descriptive enough. Add a lockdep assertion for the !PREEMPT_RT case to catch callers which do not have preemption disabled. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220825164131.402717-2-bigeasy@linutronix.de
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions