null_vnops.c (143744) | null_vnops.c (145424) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * John Heidemann of the UCLA Ficus project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * 32 * @(#)null_vnops.c 8.6 (Berkeley) 5/27/95 33 * 34 * Ancestors: 35 * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 36 * ...and... 37 * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project 38 * | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * John Heidemann of the UCLA Ficus project. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * 32 * @(#)null_vnops.c 8.6 (Berkeley) 5/27/95 33 * 34 * Ancestors: 35 * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 36 * ...and... 37 * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project 38 * |
39 * $FreeBSD: head/sys/fs/nullfs/null_vnops.c 143744 2005-03-17 12:00:05Z jeff $ | 39 * $FreeBSD: head/sys/fs/nullfs/null_vnops.c 145424 2005-04-22 22:42:44Z jeff $ |
40 */ 41 42/* 43 * Null Layer 44 * 45 * (See mount_nullfs(8) for more information.) 46 * 47 * The null layer duplicates a portion of the filesystem --- 477 unchanged lines hidden (view full) --- 525 } 526 nn = VTONULL(vp); 527 /* 528 * If we're still active we must ask the lower layer to 529 * lock as ffs has special lock considerations in it's 530 * vop lock. 531 */ 532 if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { | 40 */ 41 42/* 43 * Null Layer 44 * 45 * (See mount_nullfs(8) for more information.) 46 * 47 * The null layer duplicates a portion of the filesystem --- 477 unchanged lines hidden (view full) --- 525 } 526 nn = VTONULL(vp); 527 /* 528 * If we're still active we must ask the lower layer to 529 * lock as ffs has special lock considerations in it's 530 * vop lock. 531 */ 532 if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { |
533 VI_LOCK(lvp); | 533 VI_LOCK_FLAGS(lvp, MTX_DUPOK); |
534 VI_UNLOCK(vp); 535 /* 536 * We have to hold the vnode here to solve a potential 537 * reclaim race. If we're forcibly vgone'd while we 538 * still have refs, a thread could be sleeping inside 539 * the lowervp's vop_lock routine. When we vgone we will 540 * drop our last ref to the lowervp, which would allow it 541 * to be reclaimed. The lowervp could then be recycled, --- 140 unchanged lines hidden --- | 534 VI_UNLOCK(vp); 535 /* 536 * We have to hold the vnode here to solve a potential 537 * reclaim race. If we're forcibly vgone'd while we 538 * still have refs, a thread could be sleeping inside 539 * the lowervp's vop_lock routine. When we vgone we will 540 * drop our last ref to the lowervp, which would allow it 541 * to be reclaimed. The lowervp could then be recycled, --- 140 unchanged lines hidden --- |