vfs_bio.c (2965a4531505c497a6bbc6f2974499a520c75394) vfs_bio.c (b88b6c9d80ed2e1ad85a6b928e2c9346a41aced6)
1/*-
2 * Copyright (c) 2004 Poul-Henning Kamp
3 * Copyright (c) 1994,1997 John S. Dyson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 3010 unchanged lines hidden (view full) ---

3019 * from under us.
3020 *
3021 * We can only test VPO_BUSY here. Blocking on
3022 * m->busy might lead to a deadlock:
3023 *
3024 * vm_fault->getpages->cluster_read->allocbuf
3025 *
3026 */
1/*-
2 * Copyright (c) 2004 Poul-Henning Kamp
3 * Copyright (c) 1994,1997 John S. Dyson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 3010 unchanged lines hidden (view full) ---

3019 * from under us.
3020 *
3021 * We can only test VPO_BUSY here. Blocking on
3022 * m->busy might lead to a deadlock:
3023 *
3024 * vm_fault->getpages->cluster_read->allocbuf
3025 *
3026 */
3027 if (vm_page_sleep_if_busy(m, FALSE, "pgtblk"))
3027 if ((m->oflags & VPO_BUSY) != 0) {
3028 /*
3029 * Reference the page before unlocking
3030 * and sleeping so that the page daemon
3031 * is less likely to reclaim it.
3032 */
3033 vm_page_lock_queues();
3034 vm_page_flag_set(m, PG_REFERENCED);
3035 vm_page_sleep(m, "pgtblk");
3028 continue;
3036 continue;
3037 }
3029
3030 /*
3031 * We have a good page.
3032 */
3033 vm_page_lock_queues();
3034 vm_page_wire(m);
3035 vm_page_unlock_queues();
3036 bp->b_pages[bp->b_npages] = m;

--- 1078 unchanged lines hidden ---
3038
3039 /*
3040 * We have a good page.
3041 */
3042 vm_page_lock_queues();
3043 vm_page_wire(m);
3044 vm_page_unlock_queues();
3045 bp->b_pages[bp->b_npages] = m;

--- 1078 unchanged lines hidden ---