@@ -2231,11 +2231,18 @@ void fuse_abort_conn(struct fuse_conn *fc)
kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
end_polls(fc);
wake_up_all(&fc->blocked_waitq);
+ fc->aborting = true;
spin_unlock(&fc->lock);
end_requests(fc, &to_end);
+
+ spin_lock(&fc->lock);
+ fc->aborting = false;
+ spin_unlock(&fc->lock);
+ wake_up_all(&fc->blocked_waitq);
} else {
spin_unlock(&fc->lock);
+ wait_event(fc->blocked_waitq, !fc->aborting);
}
}
EXPORT_SYMBOL_GPL(fuse_abort_conn);
@@ -587,6 +587,9 @@ struct fuse_conn {
abort and device release */
unsigned connected;
+ /** Connection abort is in process */
+ bool aborting;
+
/** Connection aborted via sysfs */
bool aborted;
Preparation for next patches. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> --- fs/fuse/dev.c | 7 +++++++ fs/fuse/fuse_i.h | 3 +++ 2 files changed, 10 insertions(+)