Commit bce997682fe3121516f5a20cf7bad2e6029ba018
1 parent
7307de8051
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
fs/ocfs2/aops.c
... | ... | @@ -712,7 +712,8 @@ |
712 | 712 | if (!buffer_uptodate(bh)) |
713 | 713 | set_buffer_uptodate(bh); |
714 | 714 | } else if (!buffer_uptodate(bh) && !buffer_delay(bh) && |
715 | - (block_start < from || block_end > to)) { | |
715 | + !buffer_new(bh) && | |
716 | + (block_start < from || block_end > to)) { | |
716 | 717 | ll_rw_block(READ, 1, &bh); |
717 | 718 | *wait_bh++=bh; |
718 | 719 | } |