Author: pfg
Date: Mon Sep 26 02:29:28 2016
New Revision: 306332
URL: https://svnweb.freebsd.org/changeset/base/306332

Log:
  btree(3): don't shortcut closing if the metadata is dirty.
  
  Obtained from:        NetBSD (from krb5 tree)
  
  MFC after:    3 weeks

Modified:
  head/lib/libc/db/btree/bt_close.c

Modified: head/lib/libc/db/btree/bt_close.c
==============================================================================
--- head/lib/libc/db/btree/bt_close.c   Mon Sep 26 02:05:02 2016        
(r306331)
+++ head/lib/libc/db/btree/bt_close.c   Mon Sep 26 02:29:28 2016        
(r306332)
@@ -134,7 +134,8 @@ __bt_sync(const DB *dbp, u_int flags)
                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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to