diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-17 01:14:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:15:31 -0500 |
commit | 361b1eb55ea84181505c7f0674ca1205da1127ab (patch) | |
tree | f0151b501120447eeb67d73e90142c079c7650e4 /fs/fuse/dir.c | |
parent | 9b9a04693fa2d9e60933154e4c4aca83c219ef0a (diff) |
[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 <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 10 |
1 files changed, 3 insertions, 7 deletions
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, | |||
762 | return 0; | 762 | return 0; |
763 | } | 763 | } |
764 | 764 | ||
765 | static size_t fuse_send_readdir(struct fuse_req *req, struct file *file, | ||
766 | struct inode *inode, loff_t pos, size_t count) | ||
767 | { | ||
768 | return fuse_send_read_common(req, file, inode, pos, count, 1); | ||
769 | } | ||
770 | |||
771 | static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) | 765 | static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) |
772 | { | 766 | { |
773 | int err; | 767 | int err; |
@@ -791,7 +785,9 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir) | |||
791 | } | 785 | } |
792 | req->num_pages = 1; | 786 | req->num_pages = 1; |
793 | req->pages[0] = page; | 787 | req->pages[0] = page; |
794 | nbytes = fuse_send_readdir(req, file, inode, file->f_pos, PAGE_SIZE); | 788 | fuse_read_fill(req, file, inode, file->f_pos, PAGE_SIZE, FUSE_READDIR); |
789 | request_send(fc, req); | ||
790 | nbytes = req->out.args[0].size; | ||
795 | err = req->out.h.error; | 791 | err = req->out.h.error; |
796 | fuse_put_request(fc, req); | 792 | fuse_put_request(fc, req); |
797 | if (!err) | 793 | if (!err) |