diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-26 16:13:11 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-26 16:13:11 +0200 |
commit | b8f95e5d13f5f0191dcb4b9113113d241636e7cb (patch) | |
tree | 91bafee58d39bf8b75a6f6aa81ad553d5b389dcb /fs/fuse/inode.c | |
parent | 45ff350bbd9d0f0977ff270a0d427c71520c0c37 (diff) | |
download | lwn-b8f95e5d13f5f0191dcb4b9113113d241636e7cb.tar.gz lwn-b8f95e5d13f5f0191dcb4b9113113d241636e7cb.zip |
fuse: umount should wait for all requests
fuse_abort_conn() does not guarantee that all async requests have actually
finished aborting (i.e. their ->end() function is called). This could
actually result in still used inodes after umount.
Add a helper to wait until all requests are fully done. This is done by
looking at the "num_waiting" counter. When this counter drops to zero, we
can be sure that no more requests are outstanding.
Fixes: 0d8e84b0432b ("fuse: simplify request abort")
Cc: <stable@vger.kernel.org> # v4.2
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index a24df8861b40..eeab70e7904d 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -394,6 +394,8 @@ static void fuse_put_super(struct super_block *sb) fuse_send_destroy(fc); fuse_abort_conn(fc, false); + fuse_wait_aborted(fc); + mutex_lock(&fuse_mutex); list_del(&fc->entry); fuse_ctl_remove_conn(fc); |