mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
kill-the-BKL/reiserfs: release the write lock inside reiserfs_read_bitmap_block()
reiserfs_read_bitmap_block() uses sb_bread() to read the bitmap block. This helper might sleep. Then, when the bkl was used, it was released at this point. We can then relax the write lock too here. [ 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>
This commit is contained in:
parent
148d3504c1
commit
4c5eface5d
1 changed files with 2 additions and 0 deletions
|
@ -1249,7 +1249,9 @@ struct buffer_head *reiserfs_read_bitmap_block(struct super_block *sb,
|
||||||
else if (bitmap == 0)
|
else if (bitmap == 0)
|
||||||
block = (REISERFS_DISK_OFFSET_IN_BYTES >> sb->s_blocksize_bits) + 1;
|
block = (REISERFS_DISK_OFFSET_IN_BYTES >> sb->s_blocksize_bits) + 1;
|
||||||
|
|
||||||
|
reiserfs_write_unlock(sb);
|
||||||
bh = sb_bread(sb, block);
|
bh = sb_bread(sb, block);
|
||||||
|
reiserfs_write_lock(sb);
|
||||||
if (bh == NULL)
|
if (bh == NULL)
|
||||||
reiserfs_warning(sb, "sh-2029: %s: bitmap block (#%u) "
|
reiserfs_warning(sb, "sh-2029: %s: bitmap block (#%u) "
|
||||||
"reading failed", __func__, block);
|
"reading failed", __func__, block);
|
||||||
|
|
Loading…
Reference in a new issue