diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2016-04-13 01:54:36 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2016-04-13 01:54:36 +0000 |
commit | 4e6bbd6d779cabfaeba3bb158b9b7b8cf8c9d8fb (patch) | |
tree | cb2f8240de60480aaef1cf391436cf1445ebf2bc /lib/libc | |
parent | 57d12b01ce8192ab82a77fcdffb4a187f66e81be (diff) | |
download | FreeBSD-src-4e6bbd6d779cabfaeba3bb158b9b7b8cf8c9d8fb.zip FreeBSD-src-4e6bbd6d779cabfaeba3bb158b9b7b8cf8c9d8fb.tar.gz |
MFC r297626:
Follow-up r295924: Only sync hash-based db files open for writing when
closing.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/db/hash/hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 333b1a1..12220a9 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -423,7 +423,8 @@ hdestroy(HTAB *hashp) free(hashp->tmp_buf); if (hashp->fp != -1) { - (void)_fsync(hashp->fp); + if (hashp->save_file) + (void)_fsync(hashp->fp); (void)_close(hashp->fp); } |