Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ufs ufs_mknod: use vcache_get() to reload the new node.



details:   https://anonhg.NetBSD.org/src/rev/f0861cfe8d67
branches:  trunk
changeset: 796216:f0861cfe8d67
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sun May 25 13:46:16 2014 +0000

description:
ufs_mknod: use vcache_get() to reload the new node.

diffstat:

 sys/ufs/ufs/ufs_vnops.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r ba8fcafc15fb -r f0861cfe8d67 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Sun May 25 13:46:07 2014 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c   Sun May 25 13:46:16 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_vnops.c,v 1.220 2014/01/23 10:13:57 hannken Exp $  */
+/*     $NetBSD: ufs_vnops.c,v 1.221 2014/05/25 13:46:16 hannken Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.220 2014/01/23 10:13:57 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.221 2014/05/25 13:46:16 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -225,21 +225,20 @@
        UFS_WAPBL_UPDATE(*vpp, NULL, NULL, 0);
        UFS_WAPBL_END1(ap->a_dvp->v_mount, ap->a_dvp);
        /*
-        * Remove inode so that it will be reloaded by VFS_VGET and
+        * Remove inode so that it will be reloaded by vcache_get and
         * checked to see if it is an alias of an existing entry in
         * the inode cache.
         */
        (*vpp)->v_type = VNON;
        VOP_UNLOCK(*vpp);
        vgone(*vpp);
-       error = VFS_VGET(mp, ino, vpp);
+       error = vcache_get(mp, &ino, sizeof(ino), vpp);
 out:
        fstrans_done(ap->a_dvp->v_mount);
        if (error != 0) {
                *vpp = NULL;
                return (error);
        }
-       VOP_UNLOCK(*vpp);
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index