Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95272
b: refs/heads/master
c: e5d9a0d
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Apr 30, 2008
1 parent 63ca88d commit 9fb73f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c5c5e51b26413d50a9efae2ca7d6c5c6cd453ac
refs/heads/master: e5d9a0df07484d6d191756878c974e4307fb24ce
7 changes: 4 additions & 3 deletions trunk/fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,14 +966,15 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,

while (count) {
size_t nres;
size_t nbytes = min(count, nmax);
int err = fuse_get_user_pages(req, buf, nbytes, !write);
size_t nbytes_limit = min(count, nmax);
size_t nbytes;
int err = fuse_get_user_pages(req, buf, nbytes_limit, !write);
if (err) {
res = err;
break;
}
nbytes = (req->num_pages << PAGE_SHIFT) - req->page_offset;
nbytes = min(count, nbytes);
nbytes = min(nbytes_limit, nbytes);
if (write)
nres = fuse_send_write(req, file, inode, pos, nbytes,
current->files);
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages);
fc->minor = arg->minor;
fc->max_write = arg->minor < 5 ? 4096 : arg->max_write;
fc->max_write = min_t(unsigned, 4096, fc->max_write);
fc->conn_init = 1;
}
fuse_put_request(fc, req);
Expand Down Expand Up @@ -658,7 +659,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
fc->flags = d.flags;
fc->user_id = d.user_id;
fc->group_id = d.group_id;
fc->max_read = d.max_read;
fc->max_read = min_t(unsigned, 4096, d.max_read);

/* Used by get_root_inode() */
sb->s_fs_info = fc;
Expand Down

0 comments on commit 9fb73f7

Please sign in to comment.