From: Frederic Weisbecker Date: Thu, 30 Apr 2009 21:04:32 +0000 (+0200) Subject: kill-the-BKL/reiserfs: release the write lock before rescheduling on do_journal_end() X-Git-Tag: firefly_0821_release~9833^2~3455^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e6950a4da33fa84ef4402d29e2331cd5e5df9cb8;p=firefly-linux-kernel-4.4.55.git kill-the-BKL/reiserfs: release the write lock before rescheduling on do_journal_end() When do_journal_end() copies data to the journal blocks buffers in memory, it reschedules if needed between each block copied and dirtyfied. We can also release the write lock at this rescheduling stage, like did the bkl implicitly. [ Impact: release the reiserfs write lock when it is not needed ] Cc: Jeff Mahoney Cc: Chris Mason Cc: Alexander Beregalov Signed-off-by: Frederic Weisbecker --- diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 0ba98ca367c7..5cd600baf8cf 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -4232,7 +4232,9 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, next = cn->next; free_cnode(sb, cn); cn = next; + reiserfs_write_unlock(sb); cond_resched(); + reiserfs_write_lock(sb); } /* we are done with both the c_bh and d_bh, but