@@ -1349,7 +1349,6 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
(struct fuse_arg *) in->args, 0);
fuse_copy_finish(cs);
spin_lock(&fpq->lock);
- clear_bit(FR_LOCKED, &req->flags);
if (!fpq->connected) {
err = fc->aborted ? -ECONNABORTED : -ENODEV;
goto out_end;
@@ -1376,8 +1375,7 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
return reqsize;
out_end:
- if (!test_bit(FR_PRIVATE, &req->flags))
- list_del_init(&req->list);
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
return err;
@@ -1955,7 +1953,6 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
clear_bit(FR_SENT, &req->flags);
list_move(&req->list, &fpq->io);
req->out.h = oh;
- set_bit(FR_LOCKED, &req->flags);
spin_unlock(&fpq->lock);
cs->req = req;
if (!req->out.page_replace)
@@ -1965,13 +1962,11 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
fuse_copy_finish(cs);
spin_lock(&fpq->lock);
- clear_bit(FR_LOCKED, &req->flags);
if (!fpq->connected)
err = -ENOENT;
else if (err)
req->out.h.error = -EIO;
- if (!test_bit(FR_PRIVATE, &req->flags))
- list_del_init(&req->list);
+ list_del_init(&req->list);
spin_unlock(&fpq->lock);
request_end(fc, req);
@@ -332,35 +332,23 @@ struct fuse_io_priv {
* FR_FORCE: force sending of the request even if interrupted
* FR_BACKGROUND: request is sent in the background
* FR_WAITING: request is counted as "waiting"
- * FR_ABORTED: the request was aborted
* FR_INTERRUPTED: the request has been interrupted
- * FR_LOCKED: data is being copied to/from the request
* 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,
FR_FORCE,
FR_BACKGROUND,
FR_WAITING,
- FR_ABORTED,
FR_INTERRUPTED,
- FR_LOCKED,
FR_PENDING,
FR_SENT,
FR_FINISHED,
- FR_PRIVATE,
};
-/**
- * A request to the client
- *
- * .waitq.lock protects the following fields:
- * - FR_ABORTED
- * - FR_LOCKED (may also be modified under fc->lock, tested under both)
- */
+/* A request to the client */
struct fuse_req {
/** This can be on either pending processing or io lists in
fuse_conn */
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> --- fs/fuse/dev.c | 9 ++------- fs/fuse/fuse_i.h | 14 +------------- 2 files changed, 3 insertions(+), 20 deletions(-)