Deleted Added
full compact
ext2_lookup.c (175202) ext2_lookup.c (175294)
1/*-
2 * modified for 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) 1989, 1993

--- 24 unchanged lines hidden (view full) ---

33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * @(#)ufs_lookup.c 8.6 (Berkeley) 4/1/94
1/*-
2 * modified for 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) 1989, 1993

--- 24 unchanged lines hidden (view full) ---

33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 * @(#)ufs_lookup.c 8.6 (Berkeley) 4/1/94
41 * $FreeBSD: head/sys/gnu/fs/ext2fs/ext2_lookup.c 175202 2008-01-10 01:10:58Z attilio $
41 * $FreeBSD: head/sys/gnu/fs/ext2fs/ext2_lookup.c 175294 2008-01-13 14:44:15Z attilio $
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/namei.h>
47#include <sys/bio.h>
48#include <sys/buf.h>
49#include <sys/mount.h>

--- 263 unchanged lines hidden (view full) ---

313 doff_t enduseful; /* pointer past last used dir slot */
314 u_long bmask; /* block offset mask */
315 int namlen, error;
316 struct vnode **vpp = ap->a_vpp;
317 struct componentname *cnp = ap->a_cnp;
318 struct ucred *cred = cnp->cn_cred;
319 int flags = cnp->cn_flags;
320 int nameiop = cnp->cn_nameiop;
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/namei.h>
47#include <sys/bio.h>
48#include <sys/buf.h>
49#include <sys/mount.h>

--- 263 unchanged lines hidden (view full) ---

313 doff_t enduseful; /* pointer past last used dir slot */
314 u_long bmask; /* block offset mask */
315 int namlen, error;
316 struct vnode **vpp = ap->a_vpp;
317 struct componentname *cnp = ap->a_cnp;
318 struct ucred *cred = cnp->cn_cred;
319 int flags = cnp->cn_flags;
320 int nameiop = cnp->cn_nameiop;
321 struct thread *td = cnp->cn_thread;
322 ino_t saved_ino;
323
324 int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize;
325
326 bp = NULL;
327 slotoffset = -1;
328 *vpp = NULL;
329 vdp = ap->a_dvp;

--- 322 unchanged lines hidden (view full) ---

652 * implementing a sophisticated deadlock detection algorithm.
653 * Note also that this simple deadlock detection scheme will not
654 * work if the file system has any hard links other than ".."
655 * that point backwards in the directory structure.
656 */
657 pdp = vdp;
658 if (flags & ISDOTDOT) {
659 saved_ino = dp->i_ino;
321 ino_t saved_ino;
322
323 int DIRBLKSIZ = VTOI(ap->a_dvp)->i_e2fs->s_blocksize;
324
325 bp = NULL;
326 slotoffset = -1;
327 *vpp = NULL;
328 vdp = ap->a_dvp;

--- 322 unchanged lines hidden (view full) ---

651 * implementing a sophisticated deadlock detection algorithm.
652 * Note also that this simple deadlock detection scheme will not
653 * work if the file system has any hard links other than ".."
654 * that point backwards in the directory structure.
655 */
656 pdp = vdp;
657 if (flags & ISDOTDOT) {
658 saved_ino = dp->i_ino;
660 VOP_UNLOCK(pdp, 0, td); /* race to get the inode */
659 VOP_UNLOCK(pdp, 0); /* race to get the inode */
661 error = VFS_VGET(vdp->v_mount, saved_ino, LK_EXCLUSIVE, &tdp);
662 vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
663 if (error != 0)
664 return (error);
665 *vpp = tdp;
666 } else if (dp->i_number == dp->i_ino) {
667 VREF(vdp); /* we want ourself, ie "." */
668 *vpp = vdp;

--- 414 unchanged lines hidden ---
660 error = VFS_VGET(vdp->v_mount, saved_ino, LK_EXCLUSIVE, &tdp);
661 vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY);
662 if (error != 0)
663 return (error);
664 *vpp = tdp;
665 } else if (dp->i_number == dp->i_ino) {
666 VREF(vdp); /* we want ourself, ie "." */
667 *vpp = vdp;

--- 414 unchanged lines hidden ---