Skip to content

Commit

Permalink
[PATCH] fuse: fix bug in control filesystem mount
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jan 30, 2007
1 parent 436d165 commit ff79544
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/fuse/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff79544

Please sign in to comment.