|
@@ -1769,6 +1769,14 @@ __acquires(&fc->lock)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+static void end_queued_requests(struct fuse_conn *fc)
|
|
|
+{
|
|
|
+ fc->max_background = UINT_MAX;
|
|
|
+ flush_bg_queue(fc);
|
|
|
+ end_requests(fc, &fc->pending);
|
|
|
+ end_requests(fc, &fc->processing);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* Abort all requests.
|
|
|
*
|
|
@@ -1795,8 +1803,7 @@ void fuse_abort_conn(struct fuse_conn *fc)
|
|
|
fc->connected = 0;
|
|
|
fc->blocked = 0;
|
|
|
end_io_requests(fc);
|
|
|
- end_requests(fc, &fc->pending);
|
|
|
- end_requests(fc, &fc->processing);
|
|
|
+ end_queued_requests(fc);
|
|
|
wake_up_all(&fc->waitq);
|
|
|
wake_up_all(&fc->blocked_waitq);
|
|
|
kill_fasync(&fc->fasync, SIGIO, POLL_IN);
|
|
@@ -1811,8 +1818,9 @@ int fuse_dev_release(struct inode *inode, struct file *file)
|
|
|
if (fc) {
|
|
|
spin_lock(&fc->lock);
|
|
|
fc->connected = 0;
|
|
|
- end_requests(fc, &fc->pending);
|
|
|
- end_requests(fc, &fc->processing);
|
|
|
+ fc->blocked = 0;
|
|
|
+ end_queued_requests(fc);
|
|
|
+ wake_up_all(&fc->blocked_waitq);
|
|
|
spin_unlock(&fc->lock);
|
|
|
fuse_conn_put(fc);
|
|
|
}
|