swap_pager.c (a10c6f5544ccbab911d786d4b50d50cabd6bb5ab) swap_pager.c (02c62349c93f29b881498630c7a0623540255764)
1/*-
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1982, 1986, 1989, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

2607 if (cp != NULL && cp->provider == pp) {
2608 mtx_unlock(&sw_dev_mtx);
2609 swh->error = EBUSY;
2610 return;
2611 }
2612 }
2613 mtx_unlock(&sw_dev_mtx);
2614 if (gp == NULL)
1/*-
2 * Copyright (c) 1998 Matthew Dillon,
3 * Copyright (c) 1994 John S. Dyson
4 * Copyright (c) 1990 University of Utah.
5 * Copyright (c) 1982, 1986, 1989, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

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

2607 if (cp != NULL && cp->provider == pp) {
2608 mtx_unlock(&sw_dev_mtx);
2609 swh->error = EBUSY;
2610 return;
2611 }
2612 }
2613 mtx_unlock(&sw_dev_mtx);
2614 if (gp == NULL)
2615 gp = g_new_geomf(&g_swap_class, "swap", NULL);
2615 gp = g_new_geomf(&g_swap_class, "swap");
2616 cp = g_new_consumer(gp);
2617 g_attach(cp, pp);
2618 /*
2619 * XXX: Everytime you think you can improve the margin for
2620 * footshooting, somebody depends on the ability to do so:
2621 * savecore(8) wants to write to our swapdev so we cannot
2622 * set an exclusive count :-(
2623 */

--- 103 unchanged lines hidden ---
2616 cp = g_new_consumer(gp);
2617 g_attach(cp, pp);
2618 /*
2619 * XXX: Everytime you think you can improve the margin for
2620 * footshooting, somebody depends on the ability to do so:
2621 * savecore(8) wants to write to our swapdev so we cannot
2622 * set an exclusive count :-(
2623 */

--- 103 unchanged lines hidden ---