Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/db/btree don't shortcut closing if the metadata is ...



details:   https://anonhg.NetBSD.org/src/rev/67abfdf1d95b
branches:  trunk
changeset: 817661:67abfdf1d95b
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Aug 31 06:23:51 2016 +0000

description:
don't shortcut closing if the metadata is dirty (from the krb5 tree)

diffstat:

 lib/libc/db/btree/bt_close.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r de5b2e7b7bce -r 67abfdf1d95b lib/libc/db/btree/bt_close.c
--- a/lib/libc/db/btree/bt_close.c      Tue Aug 30 08:34:43 2016 +0000
+++ b/lib/libc/db/btree/bt_close.c      Wed Aug 31 06:23:51 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bt_close.c,v 1.14 2008/09/11 12:58:00 joerg Exp $      */
+/*     $NetBSD: bt_close.c,v 1.15 2016/08/31 06:23:51 christos Exp $   */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_close.c,v 1.14 2008/09/11 12:58:00 joerg Exp $");
+__RCSID("$NetBSD: bt_close.c,v 1.15 2016/08/31 06:23:51 christos Exp $");
 
 #include "namespace.h"
 
@@ -136,7 +136,8 @@
                return (RET_ERROR);
        }
 
-       if (F_ISSET(t, B_INMEM | B_RDONLY) || !F_ISSET(t, B_MODIFIED))
+       if (F_ISSET(t, B_INMEM | B_RDONLY)
+           || !F_ISSET(t, B_MODIFIED | B_METADIRTY))
                return (RET_SUCCESS);
 
        if (F_ISSET(t, B_METADIRTY) && bt_meta(t) == RET_ERROR)



Home | Main Index | Thread Index | Old Index