Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/kern Pull up revision 1.228 (requested by yamt in t...



details:   https://anonhg.NetBSD.org/src/rev/e49c8b3ecbd8
branches:  netbsd-2-0
changeset: 561488:e49c8b3ecbd8
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 21 10:20:07 2004 +0000

description:
Pull up revision 1.228 (requested by yamt in ticket #516):
getcleanvnode: don't try to reclaim a vnode marked as VXLOCK.
fix crashes with VOP_RECLAIM implementations which might block.
(eg. layered filesystems)

diffstat:

 sys/kern/vfs_subr.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r d703e41a6aea -r e49c8b3ecbd8 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Mon Jun 21 10:18:46 2004 +0000
+++ b/sys/kern/vfs_subr.c       Mon Jun 21 10:20:07 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.218.2.3 2004/06/21 10:18:46 tron Exp $  */
+/*     $NetBSD: vfs_subr.c,v 1.218.2.4 2004/06/21 10:20:07 tron Exp $  */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.218.2.3 2004/06/21 10:18:46 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.218.2.4 2004/06/21 10:20:07 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_ddb.h"
@@ -250,10 +250,8 @@
                 * as our lwp might hold the underlying vnode locked,
                 * don't try to reclaim the VLAYER vnode if it's locked.
                 */
-               if ((vp->v_flag & VLAYER) == 0) {
-                       if (vn_start_write(vp, &mp, V_NOWAIT) == 0)
-                               break;
-               } else if (VOP_ISLOCKED(vp) == 0) {
+               if ((vp->v_flag & VXLOCK) == 0 &&
+                   ((vp->v_flag & VLAYER) == 0 || VOP_ISLOCKED(vp) == 0)) {
                        if (vn_start_write(vp, &mp, V_NOWAIT) == 0)
                                break;
                }



Home | Main Index | Thread Index | Old Index