Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reiserfs: mark the superblock as dirty a bit later

The 'journal_mark_dirty()' function currently first marks the superblock as
dirty by setting 's_dirt' to 1, then does various sanity checks and returns,
then actuall does all the magic with the journal.

This is not an ideal order, though. It makes more sense to first do all the
checks, then do all the internal stuff, and at the end notify the VFS that the
superblock is now dirty.

This patch moves the 's_dirt = 1' assignment from the very beginning of this
function to the very end.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Artem Bityutskiy and committed by
Al Viro
5c5fd819 717f03c4

+1 -2
+1 -2
fs/reiserfs/journal.c
··· 3231 3231 th->t_trans_id, journal->j_trans_id); 3232 3232 } 3233 3233 3234 - sb->s_dirt = 1; 3235 - 3236 3234 prepared = test_clear_buffer_journal_prepared(bh); 3237 3235 clear_buffer_journal_restore_dirty(bh); 3238 3236 /* already in this transaction, we are done */ ··· 3314 3316 journal->j_first = cn; 3315 3317 journal->j_last = cn; 3316 3318 } 3319 + sb->s_dirt = 1; 3317 3320 return 0; 3318 3321 } 3319 3322