Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs Make sure that vnodes are locked when inactivate...



details:   https://anonhg.NetBSD.org/src/rev/de5b1d1a0c00
branches:  trunk
changeset: 480572:de5b1d1a0c00
user:      perseant <perseant%NetBSD.org@localhost>
date:      Sun Jan 16 09:15:51 2000 +0000

description:
Make sure that vnodes are locked when inactivated (e.g. by the cleaner)

diffstat:

 sys/ufs/lfs/lfs_subr.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 002a205310cb -r de5b1d1a0c00 sys/ufs/lfs/lfs_subr.c
--- a/sys/ufs/lfs/lfs_subr.c    Sun Jan 16 08:27:40 2000 +0000
+++ b/sys/ufs/lfs/lfs_subr.c    Sun Jan 16 09:15:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_subr.c,v 1.10 2000/01/16 05:56:14 perseant Exp $   */
+/*     $NetBSD: lfs_subr.c,v 1.11 2000/01/16 09:15:51 perseant Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -216,7 +216,13 @@
                                --lfs_dirvcount;
                                vp->v_flag &= ~VDIROP;
                                wakeup(&lfs_dirvcount);
-                               vrele(vp);
+                               if(vp->v_usecount == 1) {
+                                       /* vput will VOP_INACTIVE */
+                                       VOP_LOCK(vp,LK_EXCLUSIVE);
+                                       vput(vp);
+                               } else
+                                       lfs_vunref(vp);
+
                        }
                }
 



Home | Main Index | Thread Index | Old Index