Skip to content

Commit

Permalink
[fuse] Direct I/O should not use fuse_reset_request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi committed Apr 11, 2006
1 parent 4858cae commit 56cf34f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 56cf34f

Please sign in to comment.