diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2009-01-26 09:00:59 -0500 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.de> | 2009-01-26 09:00:59 -0500 |
commit | 26c3679101dbccc054dcf370143941844ba70531 (patch) | |
tree | 983066c18cacdd2d96534040d076dd66310acfe5 /fs/fuse/dev.c | |
parent | c2b8f006909b9bf9e165dfdf3c378527938c4497 (diff) |
fuse: destroy bdi on umount
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>
CC: stable@kernel.org
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index e0c7ada08a1f..c4a3d9bbdaa8 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -281,7 +281,8 @@ __releases(&fc->lock) | |||
281 | fc->blocked = 0; | 281 | fc->blocked = 0; |
282 | wake_up_all(&fc->blocked_waitq); | 282 | wake_up_all(&fc->blocked_waitq); |
283 | } | 283 | } |
284 | if (fc->num_background == FUSE_CONGESTION_THRESHOLD) { | 284 | if (fc->num_background == FUSE_CONGESTION_THRESHOLD && |
285 | fc->connected) { | ||
285 | clear_bdi_congested(&fc->bdi, READ); | 286 | clear_bdi_congested(&fc->bdi, READ); |
286 | clear_bdi_congested(&fc->bdi, WRITE); | 287 | clear_bdi_congested(&fc->bdi, WRITE); |
287 | } | 288 | } |