diff options
author | attilio <attilio@FreeBSD.org> | 2013-02-26 01:38:12 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-02-26 01:38:12 +0000 |
commit | e590e8091e823df34af5b8553df7832c49de0258 (patch) | |
tree | ea171741680ef62613fa79fb08917727e09c6bd9 /sys | |
parent | 756a9b3e47fbf2ace170ae77caa02eed2c059ec1 (diff) | |
download | FreeBSD-src-e590e8091e823df34af5b8553df7832c49de0258.zip FreeBSD-src-e590e8091e823df34af5b8553df7832c49de0258.tar.gz |
As VM_OBJECT_SLEEP() is a vm_object_t specific function, make
the passed object as the first argument of the function for consistency.
Sponsored by: EMC / Isilon storage revision
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/swap_pager.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_object.h | 2 | ||||
-rw-r--r-- | sys/vm/vm_page.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 4505536..10b89e1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1214,7 +1214,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) while ((mreq->oflags & VPO_SWAPINPROG) != 0) { mreq->oflags |= VPO_WANTED; PCPU_INC(cnt.v_intrans); - if (VM_OBJECT_SLEEP(mreq, object, PSWP, "swread", hz * 20)) { + if (VM_OBJECT_SLEEP(object, mreq, PSWP, "swread", hz * 20)) { printf( "swap_pager: indefinite wait buffer: bufobj: %p, blkno: %jd, size: %ld\n", bp->b_bufobj, (intmax_t)bp->b_blkno, bp->b_bcount); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5fd0e64..fdf1d74 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1139,7 +1139,7 @@ shadowlookup: if (object != tobject) VM_OBJECT_WUNLOCK(object); m->oflags |= VPO_WANTED; - VM_OBJECT_SLEEP(m, tobject, PDROP | PVM, "madvpo" , 0); + VM_OBJECT_SLEEP(tobject, m, PDROP | PVM, "madvpo" , 0); VM_OBJECT_WLOCK(object); goto relookup; } @@ -1337,7 +1337,7 @@ retry: if ((m->oflags & VPO_BUSY) || m->busy) { VM_OBJECT_WUNLOCK(new_object); m->oflags |= VPO_WANTED; - VM_OBJECT_SLEEP(m, orig_object, PVM, "spltwt" , 0); + VM_OBJECT_SLEEP(orig_object, m, PVM, "spltwt" , 0); VM_OBJECT_WLOCK(new_object); goto retry; } @@ -1495,7 +1495,7 @@ vm_object_backing_scan(vm_object_t object, int op) if ((p->oflags & VPO_BUSY) || p->busy) { VM_OBJECT_WUNLOCK(object); p->oflags |= VPO_WANTED; - VM_OBJECT_SLEEP(p, backing_object, + VM_OBJECT_SLEEP(backing_object, p, PDROP | PVM, "vmocol", 0); VM_OBJECT_WLOCK(object); VM_OBJECT_WLOCK(backing_object); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index a9bbffb..34b8e77 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -216,7 +216,7 @@ extern struct vm_object kmem_object_store; rw_rlock(&(object)->lock) #define VM_OBJECT_RUNLOCK(object) \ rw_runlock(&(object)->lock) -#define VM_OBJECT_SLEEP(wchan, object, pri, wmesg, timo) \ +#define VM_OBJECT_SLEEP(object, wchan, pri, wmesg, timo) \ rw_sleep((wchan), &(object)->lock, (pri), (wmesg), (timo)) #define VM_OBJECT_TRYRLOCK(object) \ rw_try_rlock(&(object)->lock) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 18f1918..52b8cbc 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -764,7 +764,7 @@ vm_page_sleep(vm_page_t m, const char *msg) * it. */ m->oflags |= VPO_WANTED; - VM_OBJECT_SLEEP(m, m->object, PVM, msg, 0); + VM_OBJECT_SLEEP(m->object, m, PVM, msg, 0); } /* |