Skip to content

Commit

Permalink
Fix mismerge.
Browse files Browse the repository at this point in the history
  • Loading branch information
attilio authored and attilio committed Aug 10, 2013
1 parent fa875dc commit f867d75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes)
if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL &&
pp->valid) {
if (vm_page_sleep_if_busy(pp, "zfsmwb",
VM_ALLOC_RBUSY, TRUE))
VM_ALLOC_SBUSY, TRUE))
continue;
} else if (pp == NULL) {
pp = vm_page_alloc(obj, OFF_TO_IDX(start),
Expand Down Expand Up @@ -526,7 +526,7 @@ mappedread_sf(vnode_t *vp, int nbytes, uio_t *uio)
for (start = uio->uio_loffset; len > 0; start += PAGESIZE) {
int bytes = MIN(PAGESIZE, len);

pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_RBUSY |
pp = vm_page_grab(obj, OFF_TO_IDX(start), VM_ALLOC_SBUSY |
VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
if (pp->valid == 0) {
zfs_vmobject_runlock(obj);
Expand Down
6 changes: 3 additions & 3 deletions sys/kern/vfs_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@ allocbuf(struct buf *bp, int size)
vm_page_lock(m);
vm_page_unwire(m, 0);
vm_page_unlock(m);
vm_page_busy_wunlock(m);
vm_page_xunbusy(m);
}
VM_OBJECT_RUNLOCK(bp->b_bufobj->bo_object);
bp->b_npages = desiredpages;
Expand Down Expand Up @@ -3490,7 +3490,7 @@ allocbuf(struct buf *bp, int size)
* pages are vfs_busy_pages().
*/
m = vm_page_grab(obj, OFF_TO_IDX(bp->b_offset) +
bp->b_npages, VM_ALLOC_RBUSY |
bp->b_npages, VM_ALLOC_SBUSY |
VM_ALLOC_SYSTEM | VM_ALLOC_WIRED |
VM_ALLOC_RETRY |
VM_ALLOC_COUNT(desiredpages - bp->b_npages));
Expand Down Expand Up @@ -3541,7 +3541,7 @@ allocbuf(struct buf *bp, int size)
vm_page_t m;

m = bp->b_pages[onpages];
vm_page_busy_runlock(m);
vm_page_sunbusy(m);
++onpages;
}
VM_OBJECT_RUNLOCK(obj);
Expand Down
10 changes: 5 additions & 5 deletions sys/vm/vm_page.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,11 +897,11 @@ vm_page_sleep_if_busy(vm_page_t m, const char *msg, int busyflags,
("vm_page_sleep_if_busy: VM_ALLOC_NOBUSY with read object lock"));

if ((busyflags & VM_ALLOC_NOBUSY) != 0) {
cond = vm_page_busy_locked(m);
} else if ((busyflags & VM_ALLOC_RBUSY) != 0)
cond = !vm_page_busy_tryrlock(m);
cond = vm_page_busied(m);
} else if ((busyflags & VM_ALLOC_SBUSY) != 0)
cond = !vm_page_trysbusy(m);
else
cond = !vm_page_busy_trywlock(m);
cond = !vm_page_tryxbusy(m);
if (cond) {

/*
Expand Down Expand Up @@ -2728,7 +2728,7 @@ vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags)
retrylookup:
if ((m = vm_page_lookup(object, pindex)) != NULL) {
if (vm_page_sleep_if_busy(m, "pgrbwt", allocflags &
(VM_ALLOC_NOBUSY | VM_ALLOC_RBUSY), TRUE))
(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY), TRUE))
goto retrylookup;
else {
if ((allocflags & VM_ALLOC_WIRED) != 0) {
Expand Down

0 comments on commit f867d75

Please sign in to comment.