Commit 5c5fd819 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by Al Viro

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: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 717f03c4
...@@ -3231,8 +3231,6 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, ...@@ -3231,8 +3231,6 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th,
th->t_trans_id, journal->j_trans_id); th->t_trans_id, journal->j_trans_id);
} }
sb->s_dirt = 1;
prepared = test_clear_buffer_journal_prepared(bh); prepared = test_clear_buffer_journal_prepared(bh);
clear_buffer_journal_restore_dirty(bh); clear_buffer_journal_restore_dirty(bh);
/* already in this transaction, we are done */ /* already in this transaction, we are done */
...@@ -3316,6 +3314,7 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, ...@@ -3316,6 +3314,7 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th,
journal->j_first = cn; journal->j_first = cn;
journal->j_last = cn; journal->j_last = cn;
} }
sb->s_dirt = 1;
return 0; return 0;
} }
......
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