diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-09 16:10:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:47 -0400 |
commit | 04730fef1f9c7277e5c730b193e681ac095b0507 (patch) | |
tree | 3694ea435eb38f10dadc5c8b6abd603a7e10f52e /fs/fuse/dev.c | |
parent | 413ef8cb302511d8e995e2b0e5517ee1a65b9c77 (diff) |
[PATCH] fuse: transfer readdir data through device
This patch removes a long lasting "hack" in FUSE, which used a separate
channel (a file descriptor refering to a disk-file) to transfer directory
contents from userspace to the kernel.
The patch adds three new operations (OPENDIR, READDIR, RELEASEDIR), which
have semantics and implementation exactly maching the respective file
operations (OPEN, READ, RELEASE).
This simplifies the directory reading code. Also disk space is not
necessary, which can be important in embedded systems.
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/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ca6fc0e96d7c..e4ada021d087 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -731,13 +731,6 @@ static struct fuse_req *request_find(struct fuse_conn *fc, u64 unique) | |||
731 | return NULL; | 731 | return NULL; |
732 | } | 732 | } |
733 | 733 | ||
734 | /* fget() needs to be done in this context */ | ||
735 | static void process_getdir(struct fuse_req *req) | ||
736 | { | ||
737 | struct fuse_getdir_out_i *arg = req->out.args[0].value; | ||
738 | arg->file = fget(arg->fd); | ||
739 | } | ||
740 | |||
741 | static int copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, | 734 | static int copy_out_args(struct fuse_copy_state *cs, struct fuse_out *out, |
742 | unsigned nbytes) | 735 | unsigned nbytes) |
743 | { | 736 | { |
@@ -817,8 +810,6 @@ static ssize_t fuse_dev_writev(struct file *file, const struct iovec *iov, | |||
817 | if (!err) { | 810 | if (!err) { |
818 | if (req->interrupted) | 811 | if (req->interrupted) |
819 | err = -ENOENT; | 812 | err = -ENOENT; |
820 | else if (req->in.h.opcode == FUSE_GETDIR && !oh.error) | ||
821 | process_getdir(req); | ||
822 | } else if (!req->interrupted) | 813 | } else if (!req->interrupted) |
823 | req->out.h.error = -EIO; | 814 | req->out.h.error = -EIO; |
824 | request_end(fc, req); | 815 | request_end(fc, req); |