projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b067dc
)
journal: add memory barrier before linking in newly created entries
author
Lennart Poettering
<lennart@poettering.net>
Wed, 4 Jan 2012 01:15:45 +0000
(
02:15
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 4 Jan 2012 01:15:45 +0000
(
02:15
+0100)
src/journal/journal-file.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index
45aab0e
..
15a752d
100644
(file)
--- a/
src/journal/journal-file.c
+++ b/
src/journal/journal-file.c
@@
-138,6
+138,9
@@
static int journal_file_refresh_header(JournalFile *f) {
f->header->boot_id = boot_id;
f->header->state = STATE_ONLINE;
+
+ __sync_synchronize();
+
return 0;
}
@@
-898,6
+901,8
@@
static int journal_file_link_entry(JournalFile *f, Object *o, uint64_t offset) {
assert(offset > 0);
assert(o->object.type == OBJECT_ENTRY);
+ __sync_synchronize();
+
/* Link up the entry itself */
r = link_entry_into_array(f,
&f->header->entry_array_offset,