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: Remove unused autofs_node::an_vnode_lock



details:   https://anonhg.NetBSD.org/src/rev/ab3598cd0c97
branches:  trunk
changeset: 461335:ab3598cd0c97
user:      tkusumi <tkusumi%NetBSD.org@localhost>
date:      Sat Nov 23 17:13:46 2019 +0000

description:
autofs: Remove unused autofs_node::an_vnode_lock

Unlike FreeBSD and DragonFlyBSD, this is unused in NetBSD.

diffstat:

 sys/fs/autofs/autofs.h       |  3 +--
 sys/fs/autofs/autofs_vnops.c |  8 ++------
 2 files changed, 3 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r a94c7f3d84be -r ab3598cd0c97 sys/fs/autofs/autofs.h
--- a/sys/fs/autofs/autofs.h    Sat Nov 23 16:50:39 2019 +0000
+++ b/sys/fs/autofs/autofs.h    Sat Nov 23 17:13:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autofs.h,v 1.3 2019/11/23 08:00:59 tkusumi Exp $       */
+/*     $NetBSD: autofs.h,v 1.4 2019/11/23 17:13:46 tkusumi Exp $       */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -111,7 +111,6 @@
            autofs_node)                an_children;
        struct autofs_mount             *an_mount;
        struct vnode                    *an_vnode;
-       kmutex_t                        an_vnode_lock;
        bool                            an_cached;
        bool                            an_wildcards;
        struct callout                  an_callout;
diff -r a94c7f3d84be -r ab3598cd0c97 sys/fs/autofs/autofs_vnops.c
--- a/sys/fs/autofs/autofs_vnops.c      Sat Nov 23 16:50:39 2019 +0000
+++ b/sys/fs/autofs/autofs_vnops.c      Sat Nov 23 17:13:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autofs_vnops.c,v 1.2 2019/11/23 15:17:46 tkusumi Exp $ */
+/*     $NetBSD: autofs_vnops.c,v 1.3 2019/11/23 17:13:46 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.2 2019/11/23 15:17:46 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autofs_vnops.c,v 1.3 2019/11/23 17:13:46 tkusumi Exp $");
 
 #include "autofs.h"
 
@@ -578,10 +578,8 @@
         * We do not free autofs_node here; instead we are
         * destroying them in autofs_node_delete().
         */
-       mutex_enter(&anp->an_vnode_lock);
        anp->an_vnode = NULL;
        vp->v_data = NULL;
-       mutex_exit(&anp->an_vnode_lock);
 
        return 0;
 }
@@ -629,7 +627,6 @@
        anp->an_name = autofs_strndup(name, namelen, KM_SLEEP);
        anp->an_ino = amp->am_last_ino++;
        callout_init(&anp->an_callout, 0);
-       mutex_init(&anp->an_vnode_lock, MUTEX_DEFAULT, IPL_NONE);
        getnanotime(&anp->an_ctime);
        anp->an_parent = parent;
        anp->an_mount = amp;
@@ -681,7 +678,6 @@
        if (anp->an_parent)
                RB_REMOVE(autofs_node_tree, &anp->an_parent->an_children, anp);
 
-       mutex_destroy(&anp->an_vnode_lock);
        kmem_strfree(anp->an_name);
        pool_put(&autofs_node_pool, anp);
 }



Home | Main Index | Thread Index | Old Index