SCCS-vsn: sys/ufs/ffs/ffs_vnops.c 7.51
SCCS-vsn: sys/ufs/ffs/ufs_vnops.c 7.51
SCCS-vsn: sys/ufs/lfs/lfs_vnops.c 7.51
SCCS-vsn: sys/ufs/ufs/ufs_vnops.c 7.51
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ffs_vnops.c 7.50 (Berkeley) %G%
+ * @(#)ffs_vnops.c 7.51 (Berkeley) %G%
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
- if (fndp->ni_dvp != NULL)
- vput(fndp->ni_dvp);
- xp = NULL;
- dp = NULL;
+ /*
+ * From name has disappeared.
+ */
+ if (doingdirectory)
+ panic("rename: lost dir entry");
+ vrele(ITOV(ip));
+ return (0);
}
/*
* Ensure that the directory entry still exists and has not
}
/*
* Ensure that the directory entry still exists and has not
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.50 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.51 (Berkeley) %G%
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
- if (fndp->ni_dvp != NULL)
- vput(fndp->ni_dvp);
- xp = NULL;
- dp = NULL;
+ /*
+ * From name has disappeared.
+ */
+ if (doingdirectory)
+ panic("rename: lost dir entry");
+ vrele(ITOV(ip));
+ return (0);
}
/*
* Ensure that the directory entry still exists and has not
}
/*
* Ensure that the directory entry still exists and has not
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_vnops.c 7.50 (Berkeley) %G%
+ * @(#)lfs_vnops.c 7.51 (Berkeley) %G%
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
- if (fndp->ni_dvp != NULL)
- vput(fndp->ni_dvp);
- xp = NULL;
- dp = NULL;
+ /*
+ * From name has disappeared.
+ */
+ if (doingdirectory)
+ panic("rename: lost dir entry");
+ vrele(ITOV(ip));
+ return (0);
}
/*
* Ensure that the directory entry still exists and has not
}
/*
* Ensure that the directory entry still exists and has not
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vnops.c 7.50 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.51 (Berkeley) %G%
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
xp = VTOI(fndp->ni_vp);
dp = VTOI(fndp->ni_dvp);
} else {
- if (fndp->ni_dvp != NULL)
- vput(fndp->ni_dvp);
- xp = NULL;
- dp = NULL;
+ /*
+ * From name has disappeared.
+ */
+ if (doingdirectory)
+ panic("rename: lost dir entry");
+ vrele(ITOV(ip));
+ return (0);
}
/*
* Ensure that the directory entry still exists and has not
}
/*
* Ensure that the directory entry still exists and has not