ext2_vnops.c (42374) | ext2_vnops.c (43301) |
---|---|
1/* 2 * modified for EXT2FS support in Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 464 unchanged lines hidden (view full) --- 473 if (fdvp == fvp) 474 vrele(fdvp); 475 else 476 vput(fdvp); 477 if (fvp != NULLVP) 478 vput(fvp); 479 return (error); 480 } | 1/* 2 * modified for EXT2FS support in Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 464 unchanged lines hidden (view full) --- 473 if (fdvp == fvp) 474 vrele(fdvp); 475 else 476 vput(fdvp); 477 if (fvp != NULLVP) 478 vput(fvp); 479 return (error); 480 } |
481 if (error = vn_lock(fvp, LK_EXCLUSIVE, p)) | 481 if ((error = vn_lock(fvp, LK_EXCLUSIVE, p)) != 0) |
482 goto abortit; 483 dp = VTOI(fdvp); 484 ip = VTOI(fvp); 485 if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) 486 || (dp->i_flags & APPEND)) { 487 VOP_UNLOCK(fvp, 0, p); 488 error = EPERM; 489 goto abortit; --- 27 unchanged lines hidden (view full) --- 517 /* 518 * 1) Bump link count while we're moving stuff 519 * around. If we crash somewhere before 520 * completing our work, the link count 521 * may be wrong, but correctable. 522 */ 523 ip->i_nlink++; 524 ip->i_flag |= IN_CHANGE; | 482 goto abortit; 483 dp = VTOI(fdvp); 484 ip = VTOI(fvp); 485 if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) 486 || (dp->i_flags & APPEND)) { 487 VOP_UNLOCK(fvp, 0, p); 488 error = EPERM; 489 goto abortit; --- 27 unchanged lines hidden (view full) --- 517 /* 518 * 1) Bump link count while we're moving stuff 519 * around. If we crash somewhere before 520 * completing our work, the link count 521 * may be wrong, but correctable. 522 */ 523 ip->i_nlink++; 524 ip->i_flag |= IN_CHANGE; |
525 if (error = UFS_UPDATE(fvp, 1)) { | 525 if ((error = UFS_UPDATE(fvp, 1)) != 0) { |
526 VOP_UNLOCK(fvp, 0, p); 527 goto bad; 528 } 529 530 /* 531 * If ".." must be changed (ie the directory gets a new 532 * parent) then the source directory must not be in the 533 * directory heirarchy above the target, as this would --- 681 unchanged lines hidden --- | 526 VOP_UNLOCK(fvp, 0, p); 527 goto bad; 528 } 529 530 /* 531 * If ".." must be changed (ie the directory gets a new 532 * parent) then the source directory must not be in the 533 * directory heirarchy above the target, as this would --- 681 unchanged lines hidden --- |