Commit 85559227 authored by Zhang Yi's avatar Zhang Yi Committed by Theodore Ts'o

jbd2: correct the printing of write_flags in jbd2_write_superblock()

The write_flags print in the trace of jbd2_write_superblock() is not
real, so move the modification before the trace.
Signed-off-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20231129114740.2686201-1-yi.zhang@huaweicloud.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 2dcf5fde
......@@ -1798,9 +1798,11 @@ static int jbd2_write_superblock(journal_t *journal, blk_opf_t write_flags)
return -EIO;
}
trace_jbd2_write_superblock(journal, write_flags);
if (!(journal->j_flags & JBD2_BARRIER))
write_flags &= ~(REQ_FUA | REQ_PREFLUSH);
trace_jbd2_write_superblock(journal, write_flags);
if (buffer_write_io_error(bh)) {
/*
* Oh, dear. A previous attempt to write the journal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment