mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
ocfs2: harden buffer check during mapping of page blocks
We don't want to submit buffer_new blocks for read i/o. This actually won't happen right now because those requests during an allocating write are all nicely aligned. It's probably a good idea to provide an explicit check though. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
parent
7307de8051
commit
bce997682f
1 changed files with 2 additions and 1 deletions
|
@ -712,6 +712,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
|
||||||
if (!buffer_uptodate(bh))
|
if (!buffer_uptodate(bh))
|
||||||
set_buffer_uptodate(bh);
|
set_buffer_uptodate(bh);
|
||||||
} else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
|
} else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
|
||||||
|
!buffer_new(bh) &&
|
||||||
(block_start < from || block_end > to)) {
|
(block_start < from || block_end > to)) {
|
||||||
ll_rw_block(READ, 1, &bh);
|
ll_rw_block(READ, 1, &bh);
|
||||||
*wait_bh++=bh;
|
*wait_bh++=bh;
|
||||||
|
|
Loading…
Reference in a new issue