mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
introduced guards for mount_lock
mount_writer: write_seqlock; that's an equivalent of {un,}lock_mount_hash()
mount_locked_reader: read_seqlock_excl; these tend to be open-coded.
No bulk conversions, please - if nothing else, quite a few places take
use mount_writer form when mount_locked_reader is sufficent. It needs
to be dealt with carefully.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
360600f8ec
commit
d154f18575
1 changed files with 5 additions and 0 deletions
|
|
@ -154,6 +154,11 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
|
|||
|
||||
extern seqlock_t mount_lock;
|
||||
|
||||
DEFINE_LOCK_GUARD_0(mount_writer, write_seqlock(&mount_lock),
|
||||
write_sequnlock(&mount_lock))
|
||||
DEFINE_LOCK_GUARD_0(mount_locked_reader, read_seqlock_excl(&mount_lock),
|
||||
read_sequnlock_excl(&mount_lock))
|
||||
|
||||
struct proc_mounts {
|
||||
struct mnt_namespace *ns;
|
||||
struct path root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue