summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:26:00 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-07-01 16:26:00 +0200
commit7a3b2c754749c73b4a255b2a1070c24dba589098 (patch)
tree450b1a148f55b11b64d5aefd82848564b32a67e4 /fs/fuse/dev.c
parentc47752673acb130e5132db0e52363e15be260ca4 (diff)
downloadop-kernel-dev-7a3b2c754749c73b4a255b2a1070c24dba589098.zip
op-kernel-dev-7a3b2c754749c73b4a255b2a1070c24dba589098.tar.gz
fuse: simplify req states
FUSE_REQ_INIT is actually the same state as FUSE_REQ_PENDING and FUSE_REQ_READING and FUSE_REQ_WRITING can be merged into a common FUSE_REQ_IO state. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 638aafd..e5c541b 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -327,7 +327,6 @@ static void queue_request(struct fuse_conn *fc, struct fuse_req *req)
req->in.h.len = sizeof(struct fuse_in_header) +
len_args(req->in.numargs, (struct fuse_arg *) req->in.args);
list_add_tail(&req->list, &fc->pending);
- req->state = FUSE_REQ_PENDING;
wake_up(&fc->waitq);
kill_fasync(&fc->fasync, SIGIO, POLL_IN);
}
@@ -1274,7 +1273,7 @@ static ssize_t fuse_dev_do_read(struct fuse_conn *fc, struct file *file,
}
req = list_entry(fc->pending.next, struct fuse_req, list);
- req->state = FUSE_REQ_READING;
+ req->state = FUSE_REQ_IO;
list_move(&req->list, &fc->io);
in = &req->in;
@@ -1905,7 +1904,7 @@ static ssize_t fuse_dev_do_write(struct fuse_conn *fc,
return nbytes;
}
- req->state = FUSE_REQ_WRITING;
+ req->state = FUSE_REQ_IO;
list_move(&req->list, &fc->io);
req->out.h = oh;
set_bit(FR_LOCKED, &req->flags);
OpenPOWER on IntegriCloud