diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:38:17 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-26 15:38:17 +0000 |
commit | 55e0987aea18d0b97fc0444c7678cbca1c7761d0 (patch) | |
tree | 1bff72784c0591a61e4e16e97fae48d0614891dc /sys/kern/vfs_subr.c | |
parent | c9087a9303414611bc4cbb6feae39d5daecb745f (diff) | |
download | src-55e0987aea18d0b97fc0444c7678cbca1c7761d0.tar.gz src-55e0987aea18d0b97fc0444c7678cbca1c7761d0.zip |
sys: extend use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Notes
Notes:
svn path=/head/; revision=298649
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 245adbc318d3..36b9c2a5e8e9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1745,7 +1745,7 @@ vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, int blksize) /* * Round up to the *next* lbn. */ - trunclbn = (length + blksize - 1) / blksize; + trunclbn = howmany(length, blksize); ASSERT_VOP_LOCKED(vp, "vtruncbuf"); restart: |