svn commit: r307641 - stable/10/lib/libc/db/btree

Pedro F. Giffuni pfg at FreeBSD.org
Wed Oct 19 16:40:41 UTC 2016


Author: pfg
Date: Wed Oct 19 16:40:38 2016
New Revision: 307641
URL: https://svnweb.freebsd.org/changeset/base/307641

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

Modified:
  stable/10/lib/libc/db/btree/bt_close.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/db/btree/bt_close.c
==============================================================================
--- stable/10/lib/libc/db/btree/bt_close.c	Wed Oct 19 16:33:43 2016	(r307640)
+++ stable/10/lib/libc/db/btree/bt_close.c	Wed Oct 19 16:40:38 2016	(r307641)
@@ -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)


More information about the svn-src-all mailing list