union_subr.c (0b08f5f73743f75cfe4603d65bf68a36aca310af) | union_subr.c (d6476ada99dfd8db77be244d6f4c5f465beabfcb) |
---|---|
1/* 2 * Copyright (c) 1994 Jan-Simon Pendry 3 * Copyright (c) 1994 4 * The Regents of the University of California. 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_subr.c 8.20 (Berkeley) 5/20/95 | 1/* 2 * Copyright (c) 1994 Jan-Simon Pendry 3 * Copyright (c) 1994 4 * The Regents of the University of California. 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_subr.c 8.20 (Berkeley) 5/20/95 |
38 * $Id: union_subr.c,v 1.26 1998/02/04 22:32:52 eivind Exp $ | 38 * $Id: union_subr.c,v 1.27 1998/02/06 12:13:44 eivind Exp $ |
39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/vnode.h> 44#include <sys/namei.h> 45#include <sys/malloc.h> 46#include <sys/fcntl.h> --- 318 unchanged lines hidden (view full) --- 365 (UNIONTOV(un)->v_mount == mp)) { 366 /* 367 * Do not assume that vget() does not 368 * lock the vnode even though flags 369 * argument is 0. 370 */ 371 if ((un->un_uppervp != NULLVP) && 372 ((un->un_flags & UN_KLOCK) == 0)) { | 39 */ 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/vnode.h> 44#include <sys/namei.h> 45#include <sys/malloc.h> 46#include <sys/fcntl.h> --- 318 unchanged lines hidden (view full) --- 365 (UNIONTOV(un)->v_mount == mp)) { 366 /* 367 * Do not assume that vget() does not 368 * lock the vnode even though flags 369 * argument is 0. 370 */ 371 if ((un->un_uppervp != NULLVP) && 372 ((un->un_flags & UN_KLOCK) == 0)) { |
373 SETKLOCK(un); | 373 SETGLOCK(un); |
374 klocked = 1; 375 } else { 376 klocked = 0; 377 } 378 if (vget(UNIONTOV(un), 0, 379 cnp ? cnp->cn_proc : NULL)) { 380 if (klocked) | 374 klocked = 1; 375 } else { 376 klocked = 0; 377 } 378 if (vget(UNIONTOV(un), 0, 379 cnp ? cnp->cn_proc : NULL)) { 380 if (klocked) |
381 CLEARKLOCK(un); | 381 CLEARGLOCK(un); |
382 union_list_unlock(hash); 383 goto loop; 384 } 385 if (klocked) | 382 union_list_unlock(hash); 383 goto loop; 384 } 385 if (klocked) |
386 CLEARKLOCK(un); | 386 CLEARGLOCK(un); |
387 break; 388 } 389 } 390 391 union_list_unlock(hash); 392 393 if (un) 394 break; --- 759 unchanged lines hidden --- | 387 break; 388 } 389 } 390 391 union_list_unlock(hash); 392 393 if (un) 394 break; --- 759 unchanged lines hidden --- |