summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2007-01-29 22:19:54 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-30 17:26:45 +0100
commitff79544754631cf3d237ff47b7d0e7ab2d211fcf (patch)
treeaec89c9cfbe2f0652b121188d6cefadd11dcf881 /fs
parent[PATCH] use __u8 rather than u8 in userspace SIZE defines in hdreg.h (diff)
downloadlinux-ff79544754631cf3d237ff47b7d0e7ab2d211fcf.tar.xz
linux-ff79544754631cf3d237ff47b7d0e7ab2d211fcf.zip
[PATCH] fuse: fix bug in control filesystem mount
The BUG in fuse_ctl_add_dentry() could be triggered if the control filesystem was unmounted and mounted again while one or more fuse filesystems were present. The fix is to reset the dentry counter in fuse_ctl_kill_sb(). Bug reported by Florent Mertens. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/control.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/control.c b/fs/fuse/control.c
index 8c58bd453993..1794305f9ed8 100644
--- a/fs/fuse/control.c
+++ b/fs/fuse/control.c
@@ -193,8 +193,12 @@ static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags,
static void fuse_ctl_kill_sb(struct super_block *sb)
{
+ struct fuse_conn *fc;
+
mutex_lock(&fuse_mutex);
fuse_control_sb = NULL;
+ list_for_each_entry(fc, &fuse_conn_list, entry)
+ fc->ctl_ndents = 0;
mutex_unlock(&fuse_mutex);
kill_litter_super(sb);