null_vfsops.c (c24fda81c9fd87df7e4fe3a567cc0292078bc7bf) | null_vfsops.c (6bdfe06ad9337a33a402bc933006265c30980780) |
---|---|
1/* 2 * Copyright (c) 1992, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 105 unchanged lines hidden (view full) --- 114 if (error) 115 return (error); 116 117 /* 118 * Unlock lower node to avoid deadlock. 119 * (XXX) VOP_ISLOCKED is needed? 120 */ 121 if ((mp->mnt_vnodecovered->v_op == null_vnodeop_p) && | 1/* 2 * Copyright (c) 1992, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 105 unchanged lines hidden (view full) --- 114 if (error) 115 return (error); 116 117 /* 118 * Unlock lower node to avoid deadlock. 119 * (XXX) VOP_ISLOCKED is needed? 120 */ 121 if ((mp->mnt_vnodecovered->v_op == null_vnodeop_p) && |
122 VOP_ISLOCKED(mp->mnt_vnodecovered)) { | 122 VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) { |
123 VOP_UNLOCK(mp->mnt_vnodecovered, 0, p); 124 isvnunlocked = 1; 125 } 126 /* 127 * Find lower node 128 */ 129 NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT|LOCKLEAF, 130 UIO_USERSPACE, args.target, p); 131 error = namei(ndp); 132 /* 133 * Re-lock vnode. 134 */ | 123 VOP_UNLOCK(mp->mnt_vnodecovered, 0, p); 124 isvnunlocked = 1; 125 } 126 /* 127 * Find lower node 128 */ 129 NDINIT(ndp, LOOKUP, FOLLOW|WANTPARENT|LOCKLEAF, 130 UIO_USERSPACE, args.target, p); 131 error = namei(ndp); 132 /* 133 * Re-lock vnode. 134 */ |
135 if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered)) | 135 if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) |
136 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY, p); 137 138 if (error) 139 return (error); 140 141 /* 142 * Sanity check on lower vnode 143 */ --- 147 unchanged lines hidden (view full) --- 291 (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)); 292#endif 293 294 /* 295 * Return locked reference to root. 296 */ 297 vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; 298 VREF(vp); | 136 vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY, p); 137 138 if (error) 139 return (error); 140 141 /* 142 * Sanity check on lower vnode 143 */ --- 147 unchanged lines hidden (view full) --- 291 (void *)NULLVPTOLOWERVP(MOUNTTONULLMOUNT(mp)->nullm_rootvp)); 292#endif 293 294 /* 295 * Return locked reference to root. 296 */ 297 vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; 298 VREF(vp); |
299 if (VOP_ISLOCKED(vp)) { | 299 if (VOP_ISLOCKED(vp, NULL)) { |
300 /* 301 * XXX 302 * Should we check type of node? 303 */ 304#ifdef DEBUG 305 printf("nullfs_root: multi null mount?\n"); 306#endif 307 vrele(vp); --- 126 unchanged lines hidden --- | 300 /* 301 * XXX 302 * Should we check type of node? 303 */ 304#ifdef DEBUG 305 printf("nullfs_root: multi null mount?\n"); 306#endif 307 vrele(vp); --- 126 unchanged lines hidden --- |