]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] fuse: fix bug in control filesystem mount
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 29 Jan 2007 21:19:54 +0000 (13:19 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 30 Jan 2007 16:26:45 +0000 (08:26 -0800)
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>
fs/fuse/control.c

index 8c58bd4539936d536ada3b3b98596002db5badd8..1794305f9ed86696f7505afdb90f591f32181e1c 100644 (file)
@@ -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);