From: Zhang Yi Date: Wed, 29 Nov 2023 11:47:39 +0000 (+0800) Subject: jbd2: correct the printing of write_flags in jbd2_write_superblock() X-Git-Tag: v6.6.17~1446 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6459656095e43782e665b398d880c519bba2d77d;p=platform%2Fkernel%2Flinux-rpi.git jbd2: correct the printing of write_flags in jbd2_write_superblock() [ Upstream commit 85559227211020b270728104c3b89918f7af27ac ] The write_flags print in the trace of jbd2_write_superblock() is not real, so move the modification before the trace. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231129114740.2686201-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 30dec2b..e7aa47a 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -1791,9 +1791,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