diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-06-18 14:12:36 -0400 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-07-10 20:31:52 -0400 |
commit | bce997682fe3121516f5a20cf7bad2e6029ba018 (patch) | |
tree | 1f54d1c289b7fac2ec036f6923a27e00a6d777ae /fs | |
parent | 7307de80510a70e5e5aa98de1e80ccbb7d90a3a8 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/aops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index b8869fd0884f..e8d16ae12ef0 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -712,7 +712,8 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, | |||
712 | if (!buffer_uptodate(bh)) | 712 | if (!buffer_uptodate(bh)) |
713 | set_buffer_uptodate(bh); | 713 | set_buffer_uptodate(bh); |
714 | } else if (!buffer_uptodate(bh) && !buffer_delay(bh) && | 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 | ll_rw_block(READ, 1, &bh); | 717 | ll_rw_block(READ, 1, &bh); |
717 | *wait_bh++=bh; | 718 | *wait_bh++=bh; |
718 | } | 719 | } |