From: Frederic Weisbecker Date: Fri, 1 May 2009 00:27:39 +0000 (+0200) Subject: kill-the-BKL/reiserfs: release the write lock on flush_commit_list() X-Git-Tag: firefly_0821_release~9833^2~3455^2~41 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e3647acb4f200add1d8e0203514f7ac925ae463;p=firefly-linux-kernel-4.4.55.git kill-the-BKL/reiserfs: release the write lock on flush_commit_list() flush_commit_list() uses ll_rw_block() to commit the pending log blocks. ll_rw_block() might sleep, and the bkl was released at this point. Then we can also relax the write lock at this point. [ 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 5cd600baf8cf..ffb7f50abc2f 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -1120,8 +1120,11 @@ static int flush_commit_list(struct super_block *s, SB_ONDISK_JOURNAL_SIZE(s); tbh = journal_find_get_block(s, bn); if (tbh) { - if (buffer_dirty(tbh)) - ll_rw_block(WRITE, 1, &tbh) ; + if (buffer_dirty(tbh)) { + reiserfs_write_unlock(s); + ll_rw_block(WRITE, 1, &tbh); + reiserfs_write_lock(s); + } put_bh(tbh) ; } }