summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2011-02-03 14:42:46 +0000
committeralc <alc@FreeBSD.org>2011-02-03 14:42:46 +0000
commit3e042452aeb25eaac6abaa2ab232580270f44733 (patch)
tree20afebbc4c988b9dd48db64847c97c1399a493f8 /sys/kern/vfs_bio.c
parent5cec5b65a536337095eaeb2b594afe03910f4db5 (diff)
downloadFreeBSD-src-3e042452aeb25eaac6abaa2ab232580270f44733.zip
FreeBSD-src-3e042452aeb25eaac6abaa2ab232580270f44733.tar.gz
Eliminate unnecessary page hold_count checks. These checks predate
r90944, which introduced a general mechanism for handling the freeing of held pages. Reviewed by: kib@
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b1e278d..b81e2f8 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1647,8 +1647,7 @@ vfs_vmio_release(struct buf *bp)
* no valid data. We also free the page if the
* buffer was used for direct I/O
*/
- if ((bp->b_flags & B_ASYNC) == 0 && !m->valid &&
- m->hold_count == 0) {
+ if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) {
vm_page_free(m);
} else if (bp->b_flags & B_DIRECT) {
vm_page_try_to_free(m);
OpenPOWER on IntegriCloud