Source-Changes-HG archive

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

[src/trunk]: src/sys Remove now redundant calls to fstrans_start()/fstrans_do...



details:   https://anonhg.NetBSD.org/src/rev/3a0db72001d7
branches:  trunk
changeset: 822646:3a0db72001d7
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Mar 30 09:10:46 2017 +0000

description:
Remove now redundant calls to fstrans_start()/fstrans_done().

diffstat:

 sys/miscfs/genfs/genfs_rename.c |  10 ++--------
 sys/ufs/chfs/chfs_vnops.c       |  10 +---------
 sys/ufs/ufs/ufs_lookup.c        |   8 ++------
 3 files changed, 5 insertions(+), 23 deletions(-)

diffs (154 lines):

diff -r 41a63c9bce2a -r 3a0db72001d7 sys/miscfs/genfs/genfs_rename.c
--- a/sys/miscfs/genfs/genfs_rename.c   Thu Mar 30 09:10:08 2017 +0000
+++ b/sys/miscfs/genfs/genfs_rename.c   Thu Mar 30 09:10:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_rename.c,v 1.2 2014/02/06 10:57:12 hannken Exp $ */
+/*     $NetBSD: genfs_rename.c,v 1.3 2017/03/30 09:11:12 hannken Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_rename.c,v 1.2 2014/02/06 10:57:12 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_rename.c,v 1.3 2017/03/30 09:11:12 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/kauth.h>
@@ -45,7 +45,6 @@
 #include <sys/namei.h>
 #include <sys/stat.h>
 #include <sys/vnode.h>
-#include <sys/fstrans.h>
 #include <sys/types.h>
 
 #include <miscfs/genfs/genfs.h>
@@ -177,7 +176,6 @@
        struct componentname *fcnp = ap->a_fcnp;
        struct vnode *tdvp = ap->a_tdvp;
        struct vnode *tvp = ap->a_tvp;
-       struct mount *mp = fdvp->v_mount;
        struct componentname *tcnp = ap->a_tcnp;
        kauth_cred_t cred;
        int error;
@@ -196,8 +194,6 @@
        KASSERT(fdvp->v_type == VDIR);
        KASSERT(tdvp->v_type == VDIR);
 
-       fstrans_start(mp, FSTRANS_SHARED);
-
        cred = fcnp->cn_cred;
 
        /*
@@ -232,8 +228,6 @@
        vrele(fdvp);
        vrele(tdvp);
 
-       fstrans_done(mp);
-
        return error;
 }
 
diff -r 41a63c9bce2a -r 3a0db72001d7 sys/ufs/chfs/chfs_vnops.c
--- a/sys/ufs/chfs/chfs_vnops.c Thu Mar 30 09:10:08 2017 +0000
+++ b/sys/ufs/chfs/chfs_vnops.c Thu Mar 30 09:10:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_vnops.c,v 1.29 2016/08/20 12:37:09 hannken Exp $  */
+/*     $NetBSD: chfs_vnops.c,v 1.30 2017/03/30 09:10:46 hannken Exp $  */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -43,7 +43,6 @@
 #include <sys/stat.h>
 #include <sys/fcntl.h>
 #include <sys/buf.h>
-#include <sys/fstrans.h>
 #include <sys/vnode.h>
 
 #include "chfs.h"
@@ -653,8 +652,6 @@
        if (uio->uio_resid == 0)
                return (0);
 
-       fstrans_start(vp->v_mount, FSTRANS_SHARED);
-
        if (uio->uio_offset >= ip->size)
                goto out;
 
@@ -737,7 +734,6 @@
                ip->iflag |= IN_ACCESS;
                if ((ap->a_ioflag & IO_SYNC) == IO_SYNC) {
                        if (error) {
-                               fstrans_done(vp->v_mount);
                                return error;
                        }
                        error = chfs_update(vp, NULL, NULL, UPDATE_WAIT);
@@ -745,7 +741,6 @@
        }
 
        dbg("[END]\n");
-       fstrans_done(vp->v_mount);
 
        return (error);
 }
@@ -833,8 +828,6 @@
        if (uio->uio_resid == 0)
                return (0);
 
-       fstrans_start(vp->v_mount, FSTRANS_SHARED);
-
        flags = ioflag & IO_SYNC ? B_SYNC : 0;
        async = vp->v_mount->mnt_flag & MNT_ASYNC;
        origoff = uio->uio_offset;
@@ -1003,7 +996,6 @@
 
 
        KASSERT(vp->v_size == ip->size);
-       fstrans_done(vp->v_mount);
 
        mutex_enter(&chmp->chm_lock_mountfields);
        error = chfs_write_flash_vnode(chmp, ip, ALLOC_NORMAL);
diff -r 41a63c9bce2a -r 3a0db72001d7 sys/ufs/ufs/ufs_lookup.c
--- a/sys/ufs/ufs/ufs_lookup.c  Thu Mar 30 09:10:08 2017 +0000
+++ b/sys/ufs/ufs/ufs_lookup.c  Thu Mar 30 09:10:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_lookup.c,v 1.145 2016/04/29 02:38:19 christos Exp $        */
+/*     $NetBSD: ufs_lookup.c,v 1.146 2017/03/30 09:11:45 hannken Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.145 2016/04/29 02:38:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.146 2017/03/30 09:11:45 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ffs.h"
@@ -54,7 +54,6 @@
 #include <sys/kernel.h>
 #include <sys/kauth.h>
 #include <sys/wapbl.h>
-#include <sys/fstrans.h>
 #include <sys/proc.h>
 #include <sys/kmem.h>
 
@@ -376,8 +375,6 @@
                cnp->cn_flags |= ISWHITEOUT;
        }
 
-       fstrans_start(vdp->v_mount, FSTRANS_SHARED);
-
        /*
         * Suppress search for slots unless creating
         * file and at end of pathname, in which case
@@ -695,7 +692,6 @@
        error = 0;
 
 out:
-       fstrans_done(vdp->v_mount);
        return error;
 }
 



Home | Main Index | Thread Index | Old Index