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:
@@ -116,6 +116,7 @@ struct autofs_sb_info {
|
||||
int needs_reghost;
|
||||
struct super_block *sb;
|
||||
struct mutex wq_mutex;
|
||||
struct mutex pipe_mutex;
|
||||
spinlock_t fs_lock;
|
||||
struct autofs_wait_queue *queues; /* Wait queue pointer */
|
||||
spinlock_t lookup_lock;
|
||||
|
Reference in New Issue
Block a user