summaryrefslogtreecommitdiff
path: root/fs/reiserfs/journal.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-05-01 02:27:39 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2009-09-14 07:18:13 +0200
commit6e3647acb4f200add1d8e0203514f7ac925ae463 (patch)
tree95a779d1f59c04ca58956a49340b88497b476f13 /fs/reiserfs/journal.c
parent4c5eface5d0e4eb7f77be346193c2850e7e3b983 (diff)
downloadlinux-3.10-6e3647acb4f200add1d8e0203514f7ac925ae463.tar.gz
linux-3.10-6e3647acb4f200add1d8e0203514f7ac925ae463.tar.bz2
linux-3.10-6e3647acb4f200add1d8e0203514f7ac925ae463.zip
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 <jeffm@suse.com> Cc: Chris Mason <chris.mason@oracle.com> Cc: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r--fs/reiserfs/journal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 5cd600baf8c..ffb7f50abc2 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) ;
}
}