From 361b1eb55ea84181505c7f0674ca1205da1127ab Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 16 Jan 2006 22:14:45 -0800 Subject: [PATCH] fuse: READ request initialization Add a separate function for filling in the READ request. This will make it possible to send asynchronous READ requests as well as synchronous ones. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fuse/dir.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'fs/fuse/dir.c') diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index e47fa3a2b4af..21fd59c7bc24 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -762,12 +762,6 @@ static int parse_dirfile(char *buf, size_t nbytes, struct file *file, return 0; } -static size_t fuse_send_readdir(struct fuse_req *req, struct file *file, - struct inode *inode, loff_t pos, size_t count) -{ - return fuse_send_read_common(req, file, inode, pos, count, 1); -} - static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) { int err; @@ -791,7 +785,9 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) } req->num_pages = 1; req->pages[0] = page; - nbytes = fuse_send_readdir(req, file, inode, file->f_pos, PAGE_SIZE); + fuse_read_fill(req, file, inode, file->f_pos, PAGE_SIZE, FUSE_READDIR); + request_send(fc, req); + nbytes = req->out.args[0].size; err = req->out.h.error; fuse_put_request(fc, req); if (!err) -- cgit v1.2.2