From 87884aad6ee7a01f0d7e9d79c90e6376b34fd820 Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Fri, 6 Feb 1998 02:42:21 +0000 Subject: [PATCH] Workarround for DIAGNOSTIC kernel's panic in union_lookup(). Union_removed_upper() clobbers cache when file is removed. Upper vp will be removed by union_reclaim(). --- sys/fs/unionfs/union_vnops.c | 8 +++++++- sys/miscfs/union/union_vnops.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index b3441ef5c91e..ca415f02e318 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.50 1998/01/22 02:14:59 kato Exp $ + * $Id: union_vnops.c,v 1.51 1998/02/04 22:32:55 eivind Exp $ */ #include "opt_diagnostic.h" @@ -1087,8 +1087,11 @@ union_remove(ap) if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc)) cnp->cn_flags |= DOWHITEOUT; error = VOP_REMOVE(dvp, vp, cnp); +#if 0 + /* XXX */ if (!error) union_removed_upper(un); +#endif } else { FIXUP(dun, p); error = union_mkwhiteout( @@ -1332,8 +1335,11 @@ union_rmdir(ap) if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc)) cnp->cn_flags |= DOWHITEOUT; error = VOP_RMDIR(dvp, vp, ap->a_cnp); +#if 0 + /* XXX */ if (!error) union_removed_upper(un); +#endif } else { FIXUP(dun, p); error = union_mkwhiteout( diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index b3441ef5c91e..ca415f02e318 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.50 1998/01/22 02:14:59 kato Exp $ + * $Id: union_vnops.c,v 1.51 1998/02/04 22:32:55 eivind Exp $ */ #include "opt_diagnostic.h" @@ -1087,8 +1087,11 @@ union_remove(ap) if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc)) cnp->cn_flags |= DOWHITEOUT; error = VOP_REMOVE(dvp, vp, cnp); +#if 0 + /* XXX */ if (!error) union_removed_upper(un); +#endif } else { FIXUP(dun, p); error = union_mkwhiteout( @@ -1332,8 +1335,11 @@ union_rmdir(ap) if (union_dowhiteout(un, cnp->cn_cred, cnp->cn_proc)) cnp->cn_flags |= DOWHITEOUT; error = VOP_RMDIR(dvp, vp, ap->a_cnp); +#if 0 + /* XXX */ if (!error) union_removed_upper(un); +#endif } else { FIXUP(dun, p); error = union_mkwhiteout(