diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 70bd5464ffdf3d79060a8ec41976778477fab3b0..5633202b199cce57b066dbf70896b9d8995759a8 100644 --- 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;