diff options
author | Ian Kent <raven@themaw.net> | 2005-05-01 19:59:17 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 19:59:17 +0400 |
commit | 3a9720ce73c9247e5262922d65e90444ea75eb50 (patch) | |
tree | c70bba916168232f530c00858e7e8a0c5bd82b38 /fs/autofs4/inode.c | |
parent | 4dcd00b18118d174c4b8d838c11f437f0af3c20c (diff) | |
download | linux-3a9720ce73c9247e5262922d65e90444ea75eb50.tar.xz |
[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.c | 1 |
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) sbi->version = 0; sbi->sub_version = 0; init_MUTEX(&sbi->wq_sem); + spin_lock_init(&sbi->fs_lock); sbi->queues = NULL; s->s_blocksize = 1024; s->s_blocksize_bits = 10; |