projects
/
qemu-gpiodev
/
libfuse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f49a0
)
fix
author
Miklos Szeredi
<miklos@szeredi.hu>
Fri, 6 Jan 2006 13:40:07 +0000
(13:40 +0000)
committer
Miklos Szeredi
<miklos@szeredi.hu>
Fri, 6 Jan 2006 13:40:07 +0000
(13:40 +0000)
kernel/file.c
patch
|
blob
|
history
diff --git
a/kernel/file.c
b/kernel/file.c
index 9cadfcbe4c5d2c0715da66a2c5adb7ad2a6489db..2486e7abfd95055397e769cc39fc24635187cb6a 100644
(file)
--- a/
kernel/file.c
+++ b/
kernel/file.c
@@
-589,7
+589,8
@@
static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf,
nbytes = min(nbytes, (unsigned) FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT);
npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
- npages = min(max(npages, 1), FUSE_MAX_PAGES_PER_REQ);
+ npages = max(npages, 1);
+ npages = min(npages, FUSE_MAX_PAGES_PER_REQ);
down_read(¤t->mm->mmap_sem);
npages = get_user_pages(current, current->mm, user_addr, npages, write,
0, req->pages, NULL);