Module Name: src Committed By: riastradh Date: Wed Jul 13 03:28:41 UTC 2011
Modified Files: src/sys/fs/tmpfs: tmpfs_vnops.c Log Message: Fix renaming over mismatched non-directory types in tmpfs. Renaming a file of any non-directory type over another file of any other non-directory type is OK -- they need not match as long as neither is a directory, so loosen the kassert to reflect this. XXX Need to write test cases for this. ok dholland, rmind To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/fs/tmpfs/tmpfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/tmpfs/tmpfs_vnops.c diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.87 src/sys/fs/tmpfs/tmpfs_vnops.c:1.88 --- src/sys/fs/tmpfs/tmpfs_vnops.c:1.87 Sun Jun 12 03:35:54 2011 +++ src/sys/fs/tmpfs/tmpfs_vnops.c Wed Jul 13 03:28:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vnops.c,v 1.87 2011/06/12 03:35:54 rmind Exp $ */ +/* $NetBSD: tmpfs_vnops.c,v 1.88 2011/07/13 03:28:41 riastradh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.87 2011/06/12 03:35:54 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.88 2011/07/13 03:28:41 riastradh Exp $"); #include <sys/param.h> #include <sys/dirent.h> @@ -979,7 +979,7 @@ tde = tmpfs_dir_lookup(tdnode, tcnp); } KASSERT(tde && tde->td_node == tnode); - KASSERT(tnode->tn_type == fnode->tn_type); + KASSERT((tnode->tn_type == VDIR) == (fnode->tn_type == VDIR)); /* * Remove and destroy the directory entry on the target