Skip to content
Commit a73f8844 authored by Jonathan Corbet's avatar Jonathan Corbet Committed by Linus Torvalds
Browse files

lglock: make lg_lock_global() actually lock globally



lg_lock_global() currently only acquires spinlocks for online CPUs, but
it's meant to lock all possible CPUs.  Lglock-protected resources may be
associated with removed CPUs - and, indeed, that could happen with the
per-superblock open files lists.

At Nick's suggestion, change for_each_online_cpu() to
for_each_possible_cpu() to protect accesses to those resources.

Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: default avatarNick Piggin <npiggin@kernel.dk>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 39aa3cb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment