Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Call lfs_orphan in lfs_rename while we're still ...
details: https://anonhg.NetBSD.org/src/rev/bc9503d75701
branches: trunk
changeset: 1007595:bc9503d75701
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 23 08:41:07 2020 +0000
description:
Call lfs_orphan in lfs_rename while we're still in the dirop.
diffstat:
sys/ufs/lfs/lfs_rename.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r c5ef06e5278f -r bc9503d75701 sys/ufs/lfs/lfs_rename.c
--- a/sys/ufs/lfs/lfs_rename.c Sun Feb 23 08:40:58 2020 +0000
+++ b/sys/ufs/lfs/lfs_rename.c Sun Feb 23 08:41:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_rename.c,v 1.22 2017/06/10 05:29:36 maya Exp $ */
+/* $NetBSD: lfs_rename.c,v 1.23 2020/02/23 08:41:07 riastradh Exp $ */
/* from NetBSD: ufs_rename.c,v 1.12 2015/03/27 17:27:56 riastradh Exp */
/*-
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.22 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_rename.c,v 1.23 2020/02/23 08:41:07 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1061,6 +1061,9 @@
fdvp, fcnp, fde, fvp,
tdvp, tcnp, tde, tvp);
+ if (tvp && VTOI(tvp)->i_nlink == 0)
+ lfs_orphan(VTOI(tvp)->i_lfs, VTOI(tvp)->i_number);
+
UNMARK_VNODE(fdvp);
UNMARK_VNODE(fvp);
UNMARK_VNODE(tdvp);
Home |
Main Index |
Thread Index |
Old Index