Deleted Added
full compact
null_vnops.c (250505) null_vnops.c (252714)
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 250505 2013-05-11 11:17:44Z kib $
39 * $FreeBSD: head/sys/fs/nullfs/null_vnops.c 252714 2013-07-04 19:01:18Z 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

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

549 */
550static int
551null_rename(struct vop_rename_args *ap)
552{
553 struct vnode *tdvp = ap->a_tdvp;
554 struct vnode *fvp = ap->a_fvp;
555 struct vnode *fdvp = ap->a_fdvp;
556 struct vnode *tvp = ap->a_tvp;
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

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

549 */
550static int
551null_rename(struct vop_rename_args *ap)
552{
553 struct vnode *tdvp = ap->a_tdvp;
554 struct vnode *fvp = ap->a_fvp;
555 struct vnode *fdvp = ap->a_fdvp;
556 struct vnode *tvp = ap->a_tvp;
557 struct null_node *tnn;
557
558 /* Check for cross-device rename. */
559 if ((fvp->v_mount != tdvp->v_mount) ||
560 (tvp && (fvp->v_mount != tvp->v_mount))) {
561 if (tdvp == tvp)
562 vrele(tdvp);
563 else
564 vput(tdvp);
565 if (tvp)
566 vput(tvp);
567 vrele(fdvp);
568 vrele(fvp);
569 return (EXDEV);
570 }
558
559 /* Check for cross-device rename. */
560 if ((fvp->v_mount != tdvp->v_mount) ||
561 (tvp && (fvp->v_mount != tvp->v_mount))) {
562 if (tdvp == tvp)
563 vrele(tdvp);
564 else
565 vput(tdvp);
566 if (tvp)
567 vput(tvp);
568 vrele(fdvp);
569 vrele(fvp);
570 return (EXDEV);
571 }
571
572
573 if (tvp != NULL) {
574 tnn = VTONULL(tvp);
575 tnn->null_flags |= NULLV_DROP;
576 }
572 return (null_bypass((struct vop_generic_args *)ap));
573}
574
575/*
576 * We need to process our own vnode lock and then clear the
577 * interlock flag as it applies only to our vnode, not the
578 * vnodes below us on the stack.
579 */

--- 303 unchanged lines hidden ---
577 return (null_bypass((struct vop_generic_args *)ap));
578}
579
580/*
581 * We need to process our own vnode lock and then clear the
582 * interlock flag as it applies only to our vnode, not the
583 * vnodes below us on the stack.
584 */

--- 303 unchanged lines hidden ---