projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35ebb41
)
cifs: fix up get_numpages
author
Jeff Layton
<jlayton@redhat.com>
Fri, 23 Mar 2012 18:40:56 +0000
(14:40 -0400)
committer
Jeff Layton
<jlayton@redhat.com>
Fri, 23 Mar 2012 18:40:56 +0000
(14:40 -0400)
Use DIV_ROUND_UP. Also, PAGE_SIZE is more appropriate here since these
aren't pagecache pages.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
fs/cifs/file.c
patch
|
blob
|
history
diff --git
a/fs/cifs/file.c
b/fs/cifs/file.c
index
70bd546
..
5633202
100644
(file)
--- a/
fs/cifs/file.c
+++ b/
fs/cifs/file.c
@@
-2071,9
+2071,7
@@
size_t get_numpages(const size_t wsize, const size_t len, size_t *cur_len)
size_t clen;
clen = min_t(const size_t, len, wsize);
- num_pages = clen / PAGE_CACHE_SIZE;
- if (clen % PAGE_CACHE_SIZE)
- num_pages++;
+ num_pages = DIV_ROUND_UP(clen, PAGE_SIZE);
if (cur_len)
*cur_len = clen;