|
@@ -1136,9 +1136,11 @@ struct buffer_head *ext3_bread(handle_t *handle, struct inode *inode,
|
|
bh = ext3_getblk(handle, inode, block, create, err);
|
|
bh = ext3_getblk(handle, inode, block, create, err);
|
|
if (!bh)
|
|
if (!bh)
|
|
return bh;
|
|
return bh;
|
|
- if (buffer_uptodate(bh))
|
|
|
|
|
|
+ if (bh_uptodate_or_lock(bh))
|
|
return bh;
|
|
return bh;
|
|
- ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
|
|
|
|
|
|
+ get_bh(bh);
|
|
|
|
+ bh->b_end_io = end_buffer_read_sync;
|
|
|
|
+ submit_bh(READ | REQ_META | REQ_PRIO, bh);
|
|
wait_on_buffer(bh);
|
|
wait_on_buffer(bh);
|
|
if (buffer_uptodate(bh))
|
|
if (buffer_uptodate(bh))
|
|
return bh;
|
|
return bh;
|
|
@@ -2068,12 +2070,10 @@ static int ext3_block_truncate_page(struct inode *inode, loff_t from)
|
|
if (PageUptodate(page))
|
|
if (PageUptodate(page))
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
|
|
|
|
- if (!buffer_uptodate(bh)) {
|
|
|
|
- err = -EIO;
|
|
|
|
- ll_rw_block(READ, 1, &bh);
|
|
|
|
- wait_on_buffer(bh);
|
|
|
|
|
|
+ if (!bh_uptodate_or_lock(bh)) {
|
|
|
|
+ err = bh_submit_read(bh);
|
|
/* Uhhuh. Read error. Complain and punt. */
|
|
/* Uhhuh. Read error. Complain and punt. */
|
|
- if (!buffer_uptodate(bh))
|
|
|
|
|
|
+ if (err)
|
|
goto unlock;
|
|
goto unlock;
|
|
}
|
|
}
|
|
|
|
|