Link Here
|
749 |
return (blk); |
749 |
return (blk); |
750 |
} |
750 |
} |
751 |
|
751 |
|
752 |
static int |
752 |
static inline int |
753 |
swp_pager_isondev(daddr_t blk, struct swdevt *sp) |
753 |
swp_pager_isondev(daddr_t blk, struct swdevt *sp) |
754 |
{ |
754 |
{ |
755 |
|
755 |
|
Link Here
|
763 |
|
763 |
|
764 |
mtx_lock(&sw_dev_mtx); |
764 |
mtx_lock(&sw_dev_mtx); |
765 |
TAILQ_FOREACH(sp, &swtailq, sw_list) { |
765 |
TAILQ_FOREACH(sp, &swtailq, sw_list) { |
766 |
if (bp->b_blkno >= sp->sw_first && bp->b_blkno < sp->sw_end) { |
766 |
if (swp_pager_isondev (bp->b_blkno, sp)) { |
767 |
mtx_unlock(&sw_dev_mtx); |
767 |
mtx_unlock(&sw_dev_mtx); |
768 |
if ((sp->sw_flags & SW_UNMAPPED) != 0 && |
768 |
if ((sp->sw_flags & SW_UNMAPPED) != 0 && |
769 |
unmapped_buf_allowed) { |
769 |
unmapped_buf_allowed) { |
Link Here
|
797 |
return; |
797 |
return; |
798 |
mtx_lock(&sw_dev_mtx); |
798 |
mtx_lock(&sw_dev_mtx); |
799 |
TAILQ_FOREACH(sp, &swtailq, sw_list) { |
799 |
TAILQ_FOREACH(sp, &swtailq, sw_list) { |
800 |
if (blk >= sp->sw_first && blk < sp->sw_end) { |
800 |
if (swp_pager_isondev (blk, sp)) { |
801 |
sp->sw_used -= npages; |
801 |
sp->sw_used -= npages; |
802 |
/* |
802 |
/* |
803 |
* If we are attempting to stop swapping on |
803 |
* If we are attempting to stop swapping on |