aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-10 22:35:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-11 00:20:12 -0500
commitd668dc56631da067540b2494d2a1f29ff7b5f15a (patch)
tree303ad17208838e8b9b1752f9427d55c84555f0f0 /fs/autofs4/inode.c
parent8753333266be67ff3a984ac1f6566d31c260bee4 (diff)
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>
Diffstat (limited to 'fs/autofs4/inode.c')
-rw-r--r--fs/autofs4/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 2ba44c79d548..e16980b00b8d 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -225,6 +225,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
225 sbi->min_proto = 0; 225 sbi->min_proto = 0;
226 sbi->max_proto = 0; 226 sbi->max_proto = 0;
227 mutex_init(&sbi->wq_mutex); 227 mutex_init(&sbi->wq_mutex);
228 mutex_init(&sbi->pipe_mutex);
228 spin_lock_init(&sbi->fs_lock); 229 spin_lock_init(&sbi->fs_lock);
229 sbi->queues = NULL; 230 sbi->queues = NULL;
230 spin_lock_init(&sbi->lookup_lock); 231 spin_lock_init(&sbi->lookup_lock);