Skip to content

Commit

Permalink
fuse: call fuse_abort_conn() in dev release
Browse files Browse the repository at this point in the history
fuse_abort_conn() does all the work done by fuse_dev_release() and more.
"More" consists of:

	end_io_requests(fc);
	wake_up_all(&fc->waitq);
	kill_fasync(&fc->fasync, SIGIO, POLL_IN);

All of which should be no-op (WARN_ON's added).

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
  • Loading branch information
Miklos Szeredi committed Jul 1, 2015
1 parent f0139aa commit ccd0a0b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2199,14 +2199,9 @@ int fuse_dev_release(struct inode *inode, struct file *file)
{
struct fuse_conn *fc = fuse_get_conn(file);
if (fc) {
spin_lock(&fc->lock);
fc->connected = 0;
fc->blocked = 0;
fuse_set_initialized(fc);
end_queued_requests(fc);
end_polls(fc);
wake_up_all(&fc->blocked_waitq);
spin_unlock(&fc->lock);
WARN_ON(!list_empty(&fc->io));
WARN_ON(fc->fasync != NULL);
fuse_abort_conn(fc);
fuse_conn_put(fc);
}

Expand Down

0 comments on commit ccd0a0b

Please sign in to comment.