diff options
author | pfg <pfg@FreeBSD.org> | 2016-10-19 16:33:43 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-10-19 16:33:43 +0000 |
commit | a46139385c3529a63172b7bf83642fe28ab3003b (patch) | |
tree | d64595dd59d47bee5b5c1ab94b4724045952e251 | |
parent | 3311d8689070efe9e08ded9ba391646ed81fe884 (diff) | |
download | FreeBSD-src-a46139385c3529a63172b7bf83642fe28ab3003b.zip FreeBSD-src-a46139385c3529a63172b7bf83642fe28ab3003b.tar.gz |
MFC r306332:
btree(3): don't shortcut closing if the metadata is dirty.
Obtained from: NetBSD (from krb5 tree)
-rw-r--r-- | lib/libc/db/btree/bt_close.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/db/btree/bt_close.c b/lib/libc/db/btree/bt_close.c index 1f85992..f1e7c8d 100644 --- a/lib/libc/db/btree/bt_close.c +++ b/lib/libc/db/btree/bt_close.c @@ -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) |