diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-12 09:49:04 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-12-12 09:49:04 +0100 |
commit | 580640ba5d331eb5631a5de46941c98f5ed90886 (patch) | |
tree | d35634561892040cb1cd4a72f2646e2cbe88f05c /fs/fuse/inode.c | |
parent | fuse: don't wake up reserved req in fuse_conn_kill() (diff) | |
download | linux-580640ba5d331eb5631a5de46941c98f5ed90886.tar.xz linux-580640ba5d331eb5631a5de46941c98f5ed90886.zip |
fuse: flush requests on umount
Use fuse_abort_conn() instead of fuse_conn_kill() in fuse_put_super().
This flushes and aborts requests still on any queues. But since we've
already reset fc->connected, those requests would not be useful anyway and
would be flushed when the fuse device is closed.
Next patches will rely on requests being flushed before the superblock is
destroyed.
Use fuse_abort_conn() in cuse_process_init_reply() too, since it makes no
difference there, and we can get rid of fuse_conn_kill().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r-- | fs/fuse/inode.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 15653a073d69..616a791270b7 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -376,27 +376,13 @@ static void fuse_bdi_destroy(struct fuse_conn *fc) bdi_destroy(&fc->bdi); } -void fuse_conn_kill(struct fuse_conn *fc) -{ - spin_lock(&fc->lock); - fc->connected = 0; - fc->blocked = 0; - fc->initialized = 1; - spin_unlock(&fc->lock); - /* Flush all readers on this fs */ - kill_fasync(&fc->fasync, SIGIO, POLL_IN); - wake_up_all(&fc->waitq); - wake_up_all(&fc->blocked_waitq); -} -EXPORT_SYMBOL_GPL(fuse_conn_kill); - static void fuse_put_super(struct super_block *sb) { struct fuse_conn *fc = get_fuse_conn_super(sb); fuse_send_destroy(fc); - fuse_conn_kill(fc); + fuse_abort_conn(fc); mutex_lock(&fuse_mutex); list_del(&fc->entry); fuse_ctl_remove_conn(fc); |