Skip to content

Commit ff79544

Browse files
szmiLinus Torvalds
authored andcommitted
[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>
1 parent 436d165 commit ff79544

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎fs/fuse/control.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,12 @@ static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags,
193193

194194
static void fuse_ctl_kill_sb(struct super_block *sb)
195195
{
196+
struct fuse_conn *fc;
197+
196198
mutex_lock(&fuse_mutex);
197199
fuse_control_sb = NULL;
200+
list_for_each_entry(fc, &fuse_conn_list, entry)
201+
fc->ctl_ndents = 0;
198202
mutex_unlock(&fuse_mutex);
199203

200204
kill_litter_super(sb);

0 commit comments

Comments
 (0)