aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/inode.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2005-05-01 11:59:17 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:59:17 -0400
commit3a9720ce73c9247e5262922d65e90444ea75eb50 (patch)
treec70bba916168232f530c00858e7e8a0c5bd82b38 /fs/autofs4/inode.c
parent4dcd00b18118d174c4b8d838c11f437f0af3c20c (diff)
[PATCH] autofs4: tree race fix
For tree mount maps, a call to chdir or chroot, to a directory above the moint point directories at a certain time during the expire results in the expire incorrectly thinking the tree is not busy. This patch adds a check to see if the filesystem above the tree mount points is busy and also locks the filesystem during the tree mount expire to prevent the race. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 a52560746628..4bb14cc68040 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -206,6 +206,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
206 sbi->version = 0; 206 sbi->version = 0;
207 sbi->sub_version = 0; 207 sbi->sub_version = 0;
208 init_MUTEX(&sbi->wq_sem); 208 init_MUTEX(&sbi->wq_sem);
209 spin_lock_init(&sbi->fs_lock);
209 sbi->queues = NULL; 210 sbi->queues = NULL;
210 s->s_blocksize = 1024; 211 s->s_blocksize = 1024;
211 s->s_blocksize_bits = 10; 212 s->s_blocksize_bits = 10;