]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fuse: destroy bdi on umount
authorMiklos Szeredi <mszeredi@suse.cz>
Mon, 26 Jan 2009 14:00:59 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Feb 2009 17:53:18 +0000 (09:53 -0800)
commit10a2691fb029da2bed2473d96fe91e6456fa88e9
treef1fc240d44ecc52730211ef6473ab6cded17626a
parent4b9e1bfac4c90ee6c67b8375dc3606ae08a5ffb8
fuse: destroy bdi on umount

commit 26c3679101dbccc054dcf370143941844ba70531 upstream.

If a fuse filesystem is unmounted but the device file descriptor
remains open and a new mount reuses the old device number, then the
mount fails with EEXIST and the following warning is printed in the
kernel log:

  WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x35/0x3d()
  sysfs: duplicate filename '0:15' can not be created

The cause is that the bdi belonging to the fuse filesystem was
destoryed only after the device file was released.  Fix this by
calling bdi_destroy() from fuse_put_super() instead.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/fuse/dev.c
fs/fuse/inode.c