aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2009-01-26 09:00:59 -0500
committerMiklos Szeredi <mszeredi@suse.de>2009-01-26 09:00:59 -0500
commit26c3679101dbccc054dcf370143941844ba70531 (patch)
tree983066c18cacdd2d96534040d076dd66310acfe5 /fs/fuse/inode.c
parentc2b8f006909b9bf9e165dfdf3c378527938c4497 (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/inode.c')
-rw-r--r--fs/fuse/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index dc649f6bc3e5..459b73dd45e1 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -292,6 +292,7 @@ static void fuse_put_super(struct super_block *sb)
292 list_del(&fc->entry); 292 list_del(&fc->entry);
293 fuse_ctl_remove_conn(fc); 293 fuse_ctl_remove_conn(fc);
294 mutex_unlock(&fuse_mutex); 294 mutex_unlock(&fuse_mutex);
295 bdi_destroy(&fc->bdi);
295 fuse_conn_put(fc); 296 fuse_conn_put(fc);
296} 297}
297 298
@@ -532,7 +533,6 @@ void fuse_conn_put(struct fuse_conn *fc)
532 if (fc->destroy_req) 533 if (fc->destroy_req)
533 fuse_request_free(fc->destroy_req); 534 fuse_request_free(fc->destroy_req);
534 mutex_destroy(&fc->inst_mutex); 535 mutex_destroy(&fc->inst_mutex);
535 bdi_destroy(&fc->bdi);
536 fc->release(fc); 536 fc->release(fc);
537 } 537 }
538} 538}