Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-0]: src/sys/miscfs/umapfs Pull up revision 1.27 (requested by y...



details:   https://anonhg.NetBSD.org/src/rev/cb4ccbd4cb13
branches:  netbsd-2-0
changeset: 561482:cb4ccbd4cb13
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 21 10:06:49 2004 +0000

description:
Pull up revision 1.27 (requested by yamt in ticket #512):
do a LAYERFS_REMOVED hack for vop_rename as well.

diffstat:

 sys/miscfs/umapfs/umap_vnops.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (46 lines):

diff -r a15f762304c0 -r cb4ccbd4cb13 sys/miscfs/umapfs/umap_vnops.c
--- a/sys/miscfs/umapfs/umap_vnops.c    Mon Jun 21 10:06:28 2004 +0000
+++ b/sys/miscfs/umapfs/umap_vnops.c    Mon Jun 21 10:06:49 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umap_vnops.c,v 1.24.2.1 2004/05/30 15:09:30 tron Exp $ */
+/*     $NetBSD: umap_vnops.c,v 1.24.2.2 2004/06/21 10:06:49 tron Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umap_vnops.c,v 1.24.2.1 2004/05/30 15:09:30 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umap_vnops.c,v 1.24.2.2 2004/06/21 10:06:49 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -508,6 +508,7 @@
        struct componentname *compnamep;
        struct ucred *compcredp, *savecompcredp;
        struct vnode *vp;
+       struct vnode *tvp;
 
        /*
         * Rename is irregular, having two componentname structures.
@@ -535,7 +536,19 @@
                printf("umap_rename: rename component credit user now %d, group %d\n", 
                    compcredp->cr_uid, compcredp->cr_gid);
 
+       tvp = ap->a_tvp;
+       if (tvp) {
+               if (tvp->v_mount != vp->v_mount)
+                       tvp = NULL;
+               else
+                       vref(tvp);
+       }
        error = umap_bypass(ap);
+       if (tvp) {
+               if (error == 0)
+                       VTOLAYER(tvp)->layer_flags |= LAYERFS_REMOVED;
+               vrele(tvp);
+       }
        
        /* Restore the additional mapped componentname cred structure. */
 



Home | Main Index | Thread Index | Old Index