summaryrefslogtreecommitdiffstats
path: root/fs/fuse/file.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-04-11 21:16:51 +0200
committerMiklos Szeredi <miklos@szeredi.hu>2006-04-11 21:16:51 +0200
commit56cf34ff0795692327234963dcdcc2cdeec2bb3d (patch)
treed7b4b736654176c361c5e78d0a8a8ef6dca9e976 /fs/fuse/file.c
parent4858cae4f0904681eab58a16891c22397618a2a2 (diff)
downloadop-kernel-dev-56cf34ff0795692327234963dcdcc2cdeec2bb3d.zip
op-kernel-dev-56cf34ff0795692327234963dcdcc2cdeec2bb3d.tar.gz
[fuse] Direct I/O should not use fuse_reset_request
It's cleaner to allocate a new request, otherwise the uid/gid/pid fields of the request won't be filled in. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Diffstat (limited to 'fs/fuse/file.c')
-rw-r--r--fs/fuse/file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index e4f041a..fc342cf 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1,6 +1,6 @@
/*
FUSE: Filesystem in Userspace
- Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu>
+ Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
@@ -565,8 +565,12 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,
buf += nres;
if (nres != nbytes)
break;
- if (count)
- fuse_reset_request(req);
+ if (count) {
+ fuse_put_request(fc, req);
+ req = fuse_get_req(fc);
+ if (IS_ERR(req))
+ break;
+ }
}
fuse_put_request(fc, req);
if (res > 0) {
OpenPOWER on IntegriCloud