diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2021-10-04 16:44:16 -0600 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2021-10-04 16:44:16 -0600 |
| commit | b718f9d919d16fb7b97a890f74d34593d9cecd20 (patch) | |
| tree | ed38d58283ae36e0478bac2e0d244e06dbcc2f1c /fs/buffer.c | |
| parent | 250a0a5ba9d2cfbdb7c77b421ff1e03d630bea46 (diff) | |
| parent | 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff) | |
Merge tag 'v5.15-rc4' into docs-next
This is needed to get a docs fix that entered via the DRM tree; testers
have requested it so that PDF builds in docs-next work again.
Diffstat (limited to 'fs/buffer.c')
| -rw-r--r-- | fs/buffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index ab7573d72dd7..c615387aedca 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1425,12 +1425,16 @@ void invalidate_bh_lrus(void) } EXPORT_SYMBOL_GPL(invalidate_bh_lrus); -void invalidate_bh_lrus_cpu(int cpu) +/* + * It's called from workqueue context so we need a bh_lru_lock to close + * the race with preemption/irq. + */ +void invalidate_bh_lrus_cpu(void) { struct bh_lru *b; bh_lru_lock(); - b = per_cpu_ptr(&bh_lrus, cpu); + b = this_cpu_ptr(&bh_lrus); __invalidate_bh_lrus(b); bh_lru_unlock(); } |
