From 56fc92c0f222b1dd3b7e954fd293d9a967ddc7bb Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 19 Apr 2012 15:22:53 -0700 Subject: [PATCH] FileStore: don't read reference to writeq head after pop_write Signed-off-by: Samuel Just --- src/os/FileJournal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 9316d0717d395..85f1c08ea69d4 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -881,6 +881,8 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64 } bl.append((const char*)&h, sizeof(h)); + if (next_write.tracked_op) + next_write.tracked_op->mark_event("write_thread_in_journal_buffer"); // pop from writeq pop_write(); journalq.push_back(pair(seq, queue_pos)); @@ -890,8 +892,6 @@ int FileJournal::prepare_single_write(bufferlist& bl, off64_t& queue_pos, uint64 if (queue_pos > header.max_size) queue_pos = queue_pos + get_top() - header.max_size; - if (next_write.tracked_op) - next_write.tracked_op->mark_event("write_thread_in_journal_buffer"); return 0; } -- 2.39.5