Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/autofs autofs: Use NULLVP for NULL vnode



details:   https://anonhg.NetBSD.org/src/rev/05a19d916bac
branches:  trunk
changeset: 461446:05a19d916bac
user:      tkusumi <tkusumi%NetBSD.org@localhost>
date:      Tue Nov 26 16:17:31 2019 +0000

description:
autofs: Use NULLVP for NULL vnode

I originally used NULL for NetBSD autofs, but it got mixed up with
NULLVP when merged with NetBSD.

diffstat:

 sys/fs/autofs/autofs_vfsops.c |   4 ++--
 sys/fs/autofs/autofs_vnops.c  |  18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (102 lines):

diff -r 7b1ef454d5b8 -r 05a19d916bac sys/fs/autofs/autofs_vfsops.c
--- a/sys/fs/autofs/autofs_vfsops.c     Tue Nov 26 10:34:16 2019 +0000
+++ b/sys/fs/autofs/autofs_vfsops.c     Tue Nov 26 16:17:31 2019 +0000
@@ -33,7 +33,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autofs_vfsops.c,v 1.7 2019/11/23 15:17:46 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autofs_vfsops.c,v 1.8 2019/11/26 16:17:31 tkusumi Exp $");
 
 
 #include "autofs.h"
@@ -273,7 +273,7 @@
        error = vn_lock(*vpp, LK_EXCLUSIVE);
        if (error) {
                vrele(*vpp);
-               *vpp = NULL;
+               *vpp = NULLVP;
                return error;
        }
 
diff -r 7b1ef454d5b8 -r 05a19d916bac sys/fs/autofs/autofs_vnops.c
--- a/sys/fs/autofs/autofs_vnops.c      Tue Nov 26 10:34:16 2019 +0000
+++ b/sys/fs/autofs/autofs_vnops.c      Tue Nov 26 16:17:31 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autofs_vnops.c,v 1.3 2019/11/23 17:13:46 tkusumi Exp $ */
+/*     $NetBSD: autofs_vnops.c,v 1.4 2019/11/26 16:17:31 tkusumi Exp $ */
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
  * Copyright (c) 2016 The DragonFly Project
@@ -34,7 +34,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autofs_vnops.c,v 1.3 2019/11/23 17:13:46 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autofs_vnops.c,v 1.4 2019/11/26 16:17:31 tkusumi Exp $");
 
 #include "autofs.h"
 
@@ -87,7 +87,7 @@
        if (autofs_mount_on_stat &&
            autofs_cached(anp, NULL, 0) == false &&
            autofs_ignore_thread() == false) {
-               struct vnode *newvp = NULL;
+               struct vnode *newvp = NULLVP;
                int error = autofs_trigger_vn(vp, "", 0, &newvp);
                if (error)
                        return error;
@@ -171,7 +171,7 @@
                return error;
 
        if (!vp->v_mountedhere) {
-               *newvp = NULL;
+               *newvp = NULLVP;
                return 0;
        } else {
                /*
@@ -212,7 +212,7 @@
        KASSERT(VOP_ISLOCKED(dvp));
 
        anp = VTOI(dvp);
-       *vpp = NULL;
+       *vpp = NULLVP;
 
        /* Check accessibility of directory. */
        KASSERT(!VOP_ACCESS(dvp, VEXEC, cnp->cn_cred));
@@ -259,7 +259,7 @@
 
        if (autofs_cached(anp, cnp->cn_nameptr, cnp->cn_namelen) == false &&
            autofs_ignore_thread() == false) {
-               struct vnode *newvp = NULL;
+               struct vnode *newvp = NULLVP;
                error = autofs_trigger_vn(dvp, cnp->cn_nameptr, cnp->cn_namelen,
                    &newvp);
                if (error)
@@ -468,7 +468,7 @@
 
        if (autofs_cached(anp, NULL, 0) == false &&
            autofs_ignore_thread() == false) {
-               struct vnode *newvp = NULL;
+               struct vnode *newvp = NULLVP;
                error = autofs_trigger_vn(vp, "", 0, &newvp);
                if (error)
                        return error;
@@ -578,7 +578,7 @@
         * We do not free autofs_node here; instead we are
         * destroying them in autofs_node_delete().
         */
-       anp->an_vnode = NULL;
+       anp->an_vnode = NULLVP;
        vp->v_data = NULL;
 
        return 0;
@@ -630,7 +630,7 @@
        getnanotime(&anp->an_ctime);
        anp->an_parent = parent;
        anp->an_mount = amp;
-       anp->an_vnode = NULL;
+       anp->an_vnode = NULLVP;
        anp->an_cached = false;
        anp->an_wildcards = false;
        anp->an_retries = 0;



Home | Main Index | Thread Index | Old Index