Commit 56cf34ff authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

[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: default avatarMiklos Szeredi <miklos@szeredi.hu>
parent 4858cae4
/*
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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment