Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/tmpfs Move a mis-placed KASSERT().
details: https://anonhg.NetBSD.org/src/rev/5ed14a8c89bf
branches: trunk
changeset: 989927:5ed14a8c89bf
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Oct 20 14:28:21 2021 +0000
description:
Move a mis-placed KASSERT().
diffstat:
sys/fs/tmpfs/tmpfs_rename.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 27f9205d2916 -r 5ed14a8c89bf sys/fs/tmpfs/tmpfs_rename.c
--- a/sys/fs/tmpfs/tmpfs_rename.c Wed Oct 20 13:29:06 2021 +0000
+++ b/sys/fs/tmpfs/tmpfs_rename.c Wed Oct 20 14:28:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_rename.c,v 1.11 2021/10/20 03:08:17 thorpej Exp $ */
+/* $NetBSD: tmpfs_rename.c,v 1.12 2021/10/20 14:28:21 thorpej Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.11 2021/10/20 03:08:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.12 2021/10/20 14:28:21 thorpej Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -402,11 +402,12 @@
KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
+ KASSERT((*dep)->td_node == VP_TO_TMPFS_NODE(vp));
+
tmpfs_dir_detach(dnode, *dep);
tmpfs_free_dirent(VFS_TO_TMPFS(mp), *dep);
tmpfs_update(dvp, TMPFS_UPDATE_MTIME | TMPFS_UPDATE_CTIME);
- KASSERT((*dep)->td_node == VP_TO_TMPFS_NODE(vp));
*tvp_nlinkp = VP_TO_TMPFS_NODE(vp)->tn_links;
return 0;
Home |
Main Index |
Thread Index |
Old Index