Skip to content

Commit

Permalink
Eliminate gratuitous clearing of the page's dirty mask.
Browse files Browse the repository at this point in the history
  • Loading branch information
alcriceedu committed May 12, 2009
1 parent 24df539 commit 12aa4fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sys/fs/smbfs/smbfs_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,8 @@ smbfs_getpages(ap)
* Read operation filled an entire page
*/
m->valid = VM_PAGE_BITS_ALL;
vm_page_undirty(m);
KASSERT(m->dirty == 0,
("smbfs_getpages: page %p is dirty", m));
} else if (size > toff) {
/*
* Read operation filled a partial page.
Expand Down
3 changes: 2 additions & 1 deletion sys/nfsclient/nfs_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ nfs_getpages(struct vop_getpages_args *ap)
* Read operation filled an entire page
*/
m->valid = VM_PAGE_BITS_ALL;
vm_page_undirty(m);
KASSERT(m->dirty == 0,
("nfs_getpages: page %p is dirty", m));
} else if (size > toff) {
/*
* Read operation filled a partial page.
Expand Down
3 changes: 2 additions & 1 deletion sys/vm/vnode_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,8 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
return VM_PAGER_OK;
} else if (reqblock == -1) {
pmap_zero_page(m[reqpage]);
vm_page_undirty(m[reqpage]);
KASSERT(m[reqpage]->dirty == 0,
("vnode_pager_generic_getpages: page %p is dirty", m));
m[reqpage]->valid = VM_PAGE_BITS_ALL;
vm_page_lock_queues();
for (i = 0; i < count; i++)
Expand Down

0 comments on commit 12aa4fd

Please sign in to comment.