autofs4: deal with autofs4_write/autofs4_write races
Just serialize the actual writing of packets into pipe on a new mutex, independent from everything else in the locking hierarchy. As soon as something has started feeding a piece of packet into the pipe to daemon, we *want* everything else about to try the same to wait until we are done. Acked-by: Ian Kent <raven@themaw.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@ -225,6 +225,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
|
||||
sbi->min_proto = 0;
|
||||
sbi->max_proto = 0;
|
||||
mutex_init(&sbi->wq_mutex);
|
||||
mutex_init(&sbi->pipe_mutex);
|
||||
spin_lock_init(&sbi->fs_lock);
|
||||
sbi->queues = NULL;
|
||||
spin_lock_init(&sbi->lookup_lock);
|
||||
|
Reference in New Issue
Block a user