null_vnops.c (227697) | null_vnops.c (229431) |
---|---|
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 227697 2011-11-19 07:50:49Z kib $ | 39 * $FreeBSD: head/sys/fs/nullfs/null_vnops.c 229431 2012-01-03 21:09:07Z kib $ |
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 --- 312 unchanged lines hidden (view full) --- 360 361 if ((error == 0 || error == EJUSTRETURN) && lvp != NULL) { 362 if (ldvp == lvp) { 363 *ap->a_vpp = dvp; 364 VREF(dvp); 365 vrele(lvp); 366 } else { 367 error = null_nodeget(dvp->v_mount, lvp, &vp); | 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 --- 312 unchanged lines hidden (view full) --- 360 361 if ((error == 0 || error == EJUSTRETURN) && lvp != NULL) { 362 if (ldvp == lvp) { 363 *ap->a_vpp = dvp; 364 VREF(dvp); 365 vrele(lvp); 366 } else { 367 error = null_nodeget(dvp->v_mount, lvp, &vp); |
368 if (error) 369 vput(lvp); 370 else | 368 if (error == 0) |
371 *ap->a_vpp = vp; 372 } 373 } 374 return (error); 375} 376 377static int 378null_open(struct vop_open_args *ap) --- 425 unchanged lines hidden (view full) --- 804 } 805 vref(ldvp); 806 error = null_nodeget(vp->v_mount, ldvp, dvp); 807 if (error == 0) { 808#ifdef DIAGNOSTIC 809 NULLVPTOLOWERVP(*dvp); 810#endif 811 VOP_UNLOCK(*dvp, 0); /* keep reference on *dvp */ | 369 *ap->a_vpp = vp; 370 } 371 } 372 return (error); 373} 374 375static int 376null_open(struct vop_open_args *ap) --- 425 unchanged lines hidden (view full) --- 802 } 803 vref(ldvp); 804 error = null_nodeget(vp->v_mount, ldvp, dvp); 805 if (error == 0) { 806#ifdef DIAGNOSTIC 807 NULLVPTOLOWERVP(*dvp); 808#endif 809 VOP_UNLOCK(*dvp, 0); /* keep reference on *dvp */ |
812 } else 813 vput(ldvp); 814 | 810 } |
815 vn_lock(vp, locked | LK_RETRY); 816 return (error); 817} 818 819/* 820 * Global vfs data structures 821 */ 822struct vop_vector null_vnodeops = { --- 22 unchanged lines hidden --- | 811 vn_lock(vp, locked | LK_RETRY); 812 return (error); 813} 814 815/* 816 * Global vfs data structures 817 */ 818struct vop_vector null_vnodeops = { --- 22 unchanged lines hidden --- |