X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjbd%2Fcommit.c;h=8e08efcaede26c06d01271b5dbebeafd55a0183d;hb=28ae094c625a9b719c01cf5ec45b8640e6911f53;hp=610264b99a8e8bb357ed46dc9a08735443ab2659;hpb=f7a5274d7dde0022dedfb6bca5b4438bbf30e9ce;p=linux-2.6 diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 610264b99a..8e08efcaed 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -131,6 +131,8 @@ static int journal_write_commit_record(journal_t *journal, barrier_done = 1; } ret = sync_dirty_buffer(bh); + if (barrier_done) + clear_buffer_ordered(bh); /* is it possible for another commit to fail at roughly * the same time as this one? If so, we don't want to * trust the barrier flag in the super, but instead want @@ -148,7 +150,6 @@ static int journal_write_commit_record(journal_t *journal, spin_unlock(&journal->j_state_lock); /* And try again, without the barrier */ - clear_buffer_ordered(bh); set_buffer_uptodate(bh); set_buffer_dirty(bh); ret = sync_dirty_buffer(bh); @@ -265,7 +266,7 @@ write_out_data: put_bh(bh); } - if (lock_need_resched(&journal->j_list_lock)) { + if (need_resched() || spin_needbreak(&journal->j_list_lock)) { spin_unlock(&journal->j_list_lock); goto write_out_data; }