Make sure that cn_flags is properly updated to account for side effects
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 22 Dec 2004 02:17:08 +0000 (02:17 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 22 Dec 2004 02:17:08 +0000 (02:17 +0000)
for *_checkpath(), otherwise relookup will panic on an assertion.

sys/vfs/gnu/ext2fs/ext2_vnops.c
sys/vfs/msdosfs/msdosfs_vnops.c

index 3ddf83f..8ba26a6 100644 (file)
@@ -44,7 +44,7 @@
  *     @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95
  *     @(#)ext2_vnops.c        8.7 (Berkeley) 2/3/94
  * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.51.2.2 2003/01/02 17:26:18 bde Exp $
- * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.17 2004/11/12 00:09:30 dillon Exp $
+ * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.18 2004/12/22 02:17:07 dillon Exp $
  */
 
 #include "opt_quota.h"
@@ -507,6 +507,7 @@ abortit:
                 */
                vref(tdvp);
                error = ext2_checkpath(ip, dp, tcnp->cn_cred);
+               tcnp->cn_flags |= CNP_PDIRUNLOCK;
                if (error) {
                        vrele(tdvp);
                        goto out;
index 336060b..bd1ed8b 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/msdosfs/msdosfs_vnops.c,v 1.95.2.4 2003/06/13 15:05:47 trhodes Exp $ */
-/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.21 2004/11/12 00:09:36 dillon Exp $ */
+/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.22 2004/12/22 02:17:08 dillon Exp $ */
 /*     $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $   */
 
 /*-
@@ -1089,6 +1089,7 @@ abortit:
                 */
                vref(tdvp);
                error = doscheckpath(ip, dp);
+               tcnp->cn_flags |= CNP_PDIRUNLOCK;
                if (error) {
                        vrele(tdvp);
                        goto out;