union_vnops.c (2960) | union_vnops.c (3396) |
---|---|
1/* 2 * Copyright (c) 1992, 1993, 1994 The Regents of the University of California. 3 * Copyright (c) 1992, 1993, 1994 Jan-Simon Pendry. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 | 1/* 2 * Copyright (c) 1992, 1993, 1994 The Regents of the University of California. 3 * Copyright (c) 1992, 1993, 1994 Jan-Simon Pendry. 4 * All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)union_vnops.c 8.6 (Berkeley) 2/17/94 |
38 * $Id: union_vnops.c,v 1.4 1994/09/21 03:47:14 wollman Exp $ | 38 * $Id: union_vnops.c,v 1.5 1994/09/21 23:22:45 wollman Exp $ |
39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/proc.h> 44#include <sys/file.h> 45#include <sys/time.h> 46#include <sys/kernel.h> --- 76 unchanged lines hidden (view full) --- 123 * which case walk up the mount hierarchy making sure not to 124 * bump into the root of the mount tree (ie. dvp != udvp). 125 */ 126 while (dvp != udvp && (dvp->v_type == VDIR) && 127 (mp = dvp->v_mountedhere)) { 128 129 if (mp->mnt_flag & MNT_MLOCK) { 130 mp->mnt_flag |= MNT_MWAIT; | 39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/proc.h> 44#include <sys/file.h> 45#include <sys/time.h> 46#include <sys/kernel.h> --- 76 unchanged lines hidden (view full) --- 123 * which case walk up the mount hierarchy making sure not to 124 * bump into the root of the mount tree (ie. dvp != udvp). 125 */ 126 while (dvp != udvp && (dvp->v_type == VDIR) && 127 (mp = dvp->v_mountedhere)) { 128 129 if (mp->mnt_flag & MNT_MLOCK) { 130 mp->mnt_flag |= MNT_MWAIT; |
131 sleep((caddr_t) mp, PVFS); | 131 (void) tsleep((caddr_t) mp, PVFS, "unlkup", 0); |
132 continue; 133 } 134 135 if (error = VFS_ROOT(mp, &tdvp)) { 136 vput(dvp); 137 return (error); 138 } 139 --- 1108 unchanged lines hidden (view full) --- 1248 struct vop_lock_args *ap; 1249{ 1250 struct vnode *vp = ap->a_vp; 1251 struct union_node *un; 1252 1253start: 1254 while (vp->v_flag & VXLOCK) { 1255 vp->v_flag |= VXWANT; | 132 continue; 133 } 134 135 if (error = VFS_ROOT(mp, &tdvp)) { 136 vput(dvp); 137 return (error); 138 } 139 --- 1108 unchanged lines hidden (view full) --- 1248 struct vop_lock_args *ap; 1249{ 1250 struct vnode *vp = ap->a_vp; 1251 struct union_node *un; 1252 1253start: 1254 while (vp->v_flag & VXLOCK) { 1255 vp->v_flag |= VXWANT; |
1256 sleep((caddr_t)vp, PINOD); | 1256 (void) tsleep((caddr_t)vp, PINOD, "unnlk1", 0); |
1257 } 1258 1259 un = VTOUNION(vp); 1260 1261 if (un->un_uppervp) { 1262 if ((un->un_flags & UN_ULOCK) == 0) { 1263 un->un_flags |= UN_ULOCK; 1264 VOP_LOCK(un->un_uppervp); --- 6 unchanged lines hidden (view full) --- 1271 1272 if (un->un_flags & UN_LOCKED) { 1273#ifdef DIAGNOSTIC 1274 if (curproc && un->un_pid == curproc->p_pid && 1275 un->un_pid > -1 && curproc->p_pid > -1) 1276 panic("union: locking against myself"); 1277#endif 1278 un->un_flags |= UN_WANT; | 1257 } 1258 1259 un = VTOUNION(vp); 1260 1261 if (un->un_uppervp) { 1262 if ((un->un_flags & UN_ULOCK) == 0) { 1263 un->un_flags |= UN_ULOCK; 1264 VOP_LOCK(un->un_uppervp); --- 6 unchanged lines hidden (view full) --- 1271 1272 if (un->un_flags & UN_LOCKED) { 1273#ifdef DIAGNOSTIC 1274 if (curproc && un->un_pid == curproc->p_pid && 1275 un->un_pid > -1 && curproc->p_pid > -1) 1276 panic("union: locking against myself"); 1277#endif 1278 un->un_flags |= UN_WANT; |
1279 sleep((caddr_t) &un->un_flags, PINOD); | 1279 (void) tsleep((caddr_t) &un->un_flags, PINOD, "unnlk2", 0); |
1280 goto start; 1281 } 1282 1283#ifdef DIAGNOSTIC 1284 if (curproc) 1285 un->un_pid = curproc->p_pid; 1286 else 1287 un->un_pid = -1; --- 212 unchanged lines hidden --- | 1280 goto start; 1281 } 1282 1283#ifdef DIAGNOSTIC 1284 if (curproc) 1285 un->un_pid = curproc->p_pid; 1286 else 1287 un->un_pid = -1; --- 212 unchanged lines hidden --- |