Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs Remove some vesti...



details:   https://anonhg.NetBSD.org/src/rev/4ff34202658e
branches:  trunk
changeset: 337284:4ff34202658e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Apr 09 19:35:55 2015 +0000

description:
Remove some vestigial #if 0 sections.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c |  84 +-----------------
 1 files changed, 3 insertions(+), 81 deletions(-)

diffs (136 lines):

diff -r 2068fce2b82c -r 4ff34202658e external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Thu Apr 09 18:22:08 2015 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Thu Apr 09 19:35:55 2015 +0000
@@ -4959,15 +4959,6 @@
        KASSERT(cnp->cn_nameptr != NULL);
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        vattr_init_mask(vap);
        mode = vap->va_mode & ALLPERMS;
 
@@ -5001,15 +4992,6 @@
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
        KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        /*
         * zfs_remove will look up the entry again itself, so discard vp.
         */
@@ -5052,15 +5034,6 @@
        KASSERT(cnp->cn_nameptr != NULL);
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        vattr_init_mask(vap);
 
        error = zfs_mkdir(dvp, __UNCONST(cnp->cn_nameptr), vap, vpp,
@@ -5092,15 +5065,6 @@
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
        KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        /*
         * zfs_rmdir will look up the entry again itself, so discard vp.
         */
@@ -5354,15 +5318,6 @@
        KASSERT(cnp->cn_nameptr != NULL);
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        vap->va_type = VLNK;    /* Netbsd: Syscall only sets va_mode. */
        vattr_init_mask(vap);
 
@@ -5568,15 +5523,6 @@
        KASSERT(cnp->cn_nameptr != NULL);
        KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE);
 
-#if 0
-       /*
-        * ZFS doesn't require dvp to be BSD-locked, and the caller
-        * expects us to drop this lock anyway, so we might as well
-        * drop it early to encourage concurrency.
-        */
-       VOP_UNLOCK(dvp);
-#endif
-
        error = zfs_link(dvp, vp, __UNCONST(cnp->cn_nameptr), cnp->cn_cred,
            NULL, 0);
 
@@ -5724,33 +5670,9 @@
        return (error);
 }
 
-#if 1
-#  define      zfs_netbsd_lock         genfs_lock
-#  define      zfs_netbsd_unlock       genfs_unlock
-#  define      zfs_netbsd_islocked     genfs_islocked
-#else
-int
-zfs_netbsd_lock(void *v)
-{
-       struct vop_lock_args *ap = v;
-
-       return 0;
-}
-
-int
-zfs_netbsd_unlock(void *v)
-{
-
-       return 0;
-}
-
-static int
-zfs_netbsd_islocked(void *v)
-{
-
-       return LK_EXCLUSIVE;
-}
-#endif
+#define        zfs_netbsd_lock         genfs_lock
+#define        zfs_netbsd_unlock       genfs_unlock
+#define        zfs_netbsd_islocked     genfs_islocked
 
 /*
 int



Home | Main Index | Thread Index | Old Index