summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/dev.c10
-rw-r--r--fs/fuse/fuse_i.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 32e0e74..7f37e55 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1328,7 +1328,8 @@ static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
return reqsize;
out_end:
- list_del_init(&req->list);
+ if (!test_bit(FR_PRIVATE, &req->flags))
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
return err;
@@ -1945,7 +1946,8 @@ static ssize_t fuse_dev_do_write(struct fuse_conn *fc,
err = -ENOENT;
else if (err)
req->out.h.error = -EIO;
- list_del_init(&req->list);
+ if (!test_bit(FR_PRIVATE, &req->flags))
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
@@ -2149,8 +2151,10 @@ void fuse_abort_conn(struct fuse_conn *fc)
req->out.h.error = -ECONNABORTED;
spin_lock(&req->waitq.lock);
set_bit(FR_ABORTED, &req->flags);
- if (!test_bit(FR_LOCKED, &req->flags))
+ if (!test_bit(FR_LOCKED, &req->flags)) {
+ set_bit(FR_PRIVATE, &req->flags);
list_move(&req->list, &to_end1);
+ }
spin_unlock(&req->waitq.lock);
}
list_splice_init(&fpq->processing, &to_end2);
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index ad3799e..a9507fd 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -269,6 +269,7 @@ struct fuse_io_priv {
* FR_PENDING: request is not yet in userspace
* FR_SENT: request is in userspace, waiting for an answer
* FR_FINISHED: request is finished
+ * FR_PRIVATE: request is on private list
*/
enum fuse_req_flag {
FR_ISREPLY,
@@ -281,6 +282,7 @@ enum fuse_req_flag {
FR_PENDING,
FR_SENT,
FR_FINISHED,
+ FR_PRIVATE,
};
/**
OpenPOWER on IntegriCloud