Skip to content

Commit

Permalink
kill-the-BKL/reiserfs: release the write lock on flush_commit_list()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frederic Weisbecker committed Sep 14, 2009
1 parent 4c5efac commit 6e3647a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/reiserfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;
}
}
Expand Down

0 comments on commit 6e3647a

Please sign in to comment.