Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs Move SET_ENDOP after vrele to avoid deactivating...



details:   https://anonhg.NetBSD.org/src/rev/1ec0da053d90
branches:  trunk
changeset: 494100:1ec0da053d90
user:      perseant <perseant%NetBSD.org@localhost>
date:      Sat Jul 01 19:03:57 2000 +0000

description:
Move SET_ENDOP after vrele to avoid deactivating vnode twice, if
SET_ENDOP triggers a write.

diffstat:

 sys/ufs/lfs/lfs_vnops.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r b4c3eab43e39 -r 1ec0da053d90 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Sat Jul 01 17:38:07 2000 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Sat Jul 01 19:03:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vnops.c,v 1.41 2000/06/28 14:16:42 mrg Exp $       */
+/*     $NetBSD: lfs_vnops.c,v 1.42 2000/07/01 19:03:57 perseant Exp $  */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -581,7 +581,6 @@
        error = ufs_remove(ap);
        UNMARK_VNODE(dvp);
        UNMARK_VNODE(vp);
-       SET_ENDOP(VTOI(dvp)->i_lfs,dvp,"remove");
 
        /*
         * If ufs_remove failed, vp doesn't need to be VDIROP any more.
@@ -594,6 +593,7 @@
        wakeup(&lfs_dirvcount);
        vrele(vp);
 
+       SET_ENDOP(VTOI(dvp)->i_lfs,dvp,"remove");
        return (error);
 }
 
@@ -621,7 +621,6 @@
        error = ufs_rmdir(ap);
        UNMARK_VNODE(ap->a_dvp);
        UNMARK_VNODE(ap->a_vp);
-       SET_ENDOP(VTOI(ap->a_dvp)->i_lfs,ap->a_dvp,"rmdir");
 
        /*
         * If ufs_rmdir failed, vp doesn't need to be VDIROP any more.
@@ -634,6 +633,7 @@
        wakeup(&lfs_dirvcount);
        vrele(ap->a_vp);
 
+       SET_ENDOP(VTOI(ap->a_dvp)->i_lfs,ap->a_dvp,"rmdir");
        return (error);
 }
 



Home | Main Index | Thread Index | Old Index