mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
fuse: use DIV_ROUND_UP helper macro for calculations
Replace open coded divisor calculations with the DIV_ROUND_UP kernel macro for better readability. Signed-off-by: Wu Bo <wubo40@huawei.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
15db16837a
commit
6c88632be3
1 changed files with 1 additions and 1 deletions
|
@ -1405,7 +1405,7 @@ static int fuse_get_user_pages(struct fuse_args_pages *ap, struct iov_iter *ii,
|
|||
nbytes += ret;
|
||||
|
||||
ret += start;
|
||||
npages = (ret + PAGE_SIZE - 1) / PAGE_SIZE;
|
||||
npages = DIV_ROUND_UP(ret, PAGE_SIZE);
|
||||
|
||||
ap->descs[ap->num_pages].offset = start;
|
||||
fuse_page_descs_length_init(ap->descs, ap->num_pages, npages);
|
||||
|
|
Loading…
Add table
Reference in a new issue