Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Revert "ufs: Prevent mkdir from choking on deleted directori...
details: https://anonhg.NetBSD.org/src/rev/4fbe5f89ca01
branches: trunk
changeset: 938239:4fbe5f89ca01
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Sep 05 02:55:38 2020 +0000
description:
Revert "ufs: Prevent mkdir from choking on deleted directories."
This change made no sense and should not have been committed.
diffstat:
sys/ufs/lfs/lfs_vnops.c | 11 ++---------
sys/ufs/lfs/ulfs_lookup.c | 6 ++----
sys/ufs/ufs/ufs_lookup.c | 6 ++----
sys/ufs/ufs/ufs_vnops.c | 11 ++---------
tests/fs/vfs/t_renamerace.c | 4 +++-
5 files changed, 11 insertions(+), 27 deletions(-)
diffs (150 lines):
diff -r fed7b8158fba -r 4fbe5f89ca01 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Sat Sep 05 02:47:48 2020 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Sat Sep 05 02:55:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.334 2020/09/05 02:47:48 riastradh Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.335 2020/09/05 02:55:38 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.334 2020/09/05 02:47:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.335 2020/09/05 02:55:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -991,13 +991,6 @@
*ap->a_vpp = NULL;
goto out;
}
- if (VTOI(*ap->a_vpp)->i_size == 0) {
- /* directory has been rmdir'd */
- vput(*ap->a_vpp);
- *ap->a_vpp = NULL;
- error = ENOENT;
- goto out;
- }
tvp = *ap->a_vpp;
MARK_VNODE(tvp);
diff -r fed7b8158fba -r 4fbe5f89ca01 sys/ufs/lfs/ulfs_lookup.c
--- a/sys/ufs/lfs/ulfs_lookup.c Sat Sep 05 02:47:48 2020 +0000
+++ b/sys/ufs/lfs/ulfs_lookup.c Sat Sep 05 02:55:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ulfs_lookup.c,v 1.45 2020/09/05 02:47:48 riastradh Exp $ */
+/* $NetBSD: ulfs_lookup.c,v 1.46 2020/09/05 02:55:38 riastradh Exp $ */
/* from NetBSD: ufs_lookup.c,v 1.135 2015/07/11 11:04:48 mlelstv */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.45 2020/09/05 02:47:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulfs_lookup.c,v 1.46 2020/09/05 02:55:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_lfs.h"
@@ -522,7 +522,6 @@
results->ulr_offset + LFS_DIRSIZ(fs, ep);
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_state |= IN_CHANGE | IN_UPDATE;
- uvm_vnp_setsize(vdp, dp->i_size);
}
brelse(bp, 0);
@@ -847,7 +846,6 @@
dp->i_size = ulr->ulr_offset + ulr->ulr_count;
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_state |= IN_CHANGE | IN_UPDATE;
- uvm_vnp_setsize(dvp, dp->i_size);
}
/*
* Get the block containing the space for the new directory entry.
diff -r fed7b8158fba -r 4fbe5f89ca01 sys/ufs/ufs/ufs_lookup.c
--- a/sys/ufs/ufs/ufs_lookup.c Sat Sep 05 02:47:48 2020 +0000
+++ b/sys/ufs/ufs/ufs_lookup.c Sat Sep 05 02:55:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_lookup.c,v 1.154 2020/09/05 02:47:48 riastradh Exp $ */
+/* $NetBSD: ufs_lookup.c,v 1.155 2020/09/05 02:55:39 riastradh Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.154 2020/09/05 02:47:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.155 2020/09/05 02:55:39 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ffs.h"
@@ -667,7 +667,6 @@
dp->i_size = newisize;
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_flag |= IN_CHANGE | IN_UPDATE;
- uvm_vnp_setsize(vdp, dp->i_size);
UFS_WAPBL_UPDATE(vdp, NULL, NULL, UPDATE_DIROP);
}
brelse(bp, 0);
@@ -957,7 +956,6 @@
dp->i_size = ulr->ulr_offset + ulr->ulr_count;
DIP_ASSIGN(dp, size, dp->i_size);
dp->i_flag |= IN_CHANGE | IN_UPDATE;
- uvm_vnp_setsize(dvp, dp->i_size);
UFS_WAPBL_UPDATE(dvp, NULL, NULL, UPDATE_DIROP);
}
/*
diff -r fed7b8158fba -r 4fbe5f89ca01 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c Sat Sep 05 02:47:48 2020 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c Sat Sep 05 02:55:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vnops.c,v 1.257 2020/09/05 02:47:48 riastradh Exp $ */
+/* $NetBSD: ufs_vnops.c,v 1.258 2020/09/05 02:55:39 riastradh Exp $ */
/*-
* Copyright (c) 2008, 2020 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.257 2020/09/05 02:47:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.258 2020/09/05 02:55:39 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -1253,13 +1253,6 @@
*ap->a_vpp = NULL;
goto out;
}
- if (VTOI(*ap->a_vpp)->i_size == 0) {
- /* directory has been rmdir'd */
- vput(*ap->a_vpp);
- *ap->a_vpp = NULL;
- error = ENOENT;
- goto out;
- }
error = UFS_WAPBL_BEGIN(ap->a_dvp->v_mount);
if (error) {
vput(*ap->a_vpp);
diff -r fed7b8158fba -r 4fbe5f89ca01 tests/fs/vfs/t_renamerace.c
--- a/tests/fs/vfs/t_renamerace.c Sat Sep 05 02:47:48 2020 +0000
+++ b/tests/fs/vfs/t_renamerace.c Sat Sep 05 02:55:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_renamerace.c,v 1.39 2020/09/05 02:47:49 riastradh Exp $ */
+/* $NetBSD: t_renamerace.c,v 1.40 2020/09/05 02:55:39 riastradh Exp $ */
/*
* Modified for rump and atf from a program supplied
@@ -248,6 +248,8 @@
atf_tc_skip("directories not supported by file system");
if (FSTYPE_RUMPFS(tc))
atf_tc_skip("rename not supported by file system");
+ if (FSTYPE_P2K_FFS(tc))
+ atf_tc_expect_fail("assertion \"vp->v_size == ip->i_size\" failed");
if (FSTYPE_PUFFS(tc))
atf_tc_expect_fail("assertion \"dfd\" failed");
if (FSTYPE_NFS(tc))
Home |
Main Index |
Thread Index |
Old Index