diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2011-12-05 02:55:11 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-01-09 07:52:07 -0500 |
commit | d03e1292c46721f60830c5d2e334966472002ed0 (patch) | |
tree | bc5a9f63fc52e4b96a6e9faa9457cb47d70b2cc7 /fs/ext3/inode.c | |
parent | bcdd0c1600903e9222abfcde28947406020ccb5d (diff) |
ext3: replace ll_rw_block with other functions
ll_rw_block() is deprecated. Thus we replace it with other functions.
CC: Jan Kara <jack@suse.cz>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/inode.c')
-rw-r--r-- | fs/ext3/inode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 9da9125ba3ef..a8d3217c5cfe 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -1136,9 +1136,11 @@ struct buffer_head *ext3_bread(handle_t *handle, struct inode *inode, | |||
1136 | bh = ext3_getblk(handle, inode, block, create, err); | 1136 | bh = ext3_getblk(handle, inode, block, create, err); |
1137 | if (!bh) | 1137 | if (!bh) |
1138 | return bh; | 1138 | return bh; |
1139 | if (buffer_uptodate(bh)) | 1139 | if (bh_uptodate_or_lock(bh)) |
1140 | return bh; | 1140 | return bh; |
1141 | ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh); | 1141 | get_bh(bh); |
1142 | bh->b_end_io = end_buffer_read_sync; | ||
1143 | submit_bh(READ | REQ_META | REQ_PRIO, bh); | ||
1142 | wait_on_buffer(bh); | 1144 | wait_on_buffer(bh); |
1143 | if (buffer_uptodate(bh)) | 1145 | if (buffer_uptodate(bh)) |
1144 | return bh; | 1146 | return bh; |
@@ -2068,12 +2070,10 @@ static int ext3_block_truncate_page(struct inode *inode, loff_t from) | |||
2068 | if (PageUptodate(page)) | 2070 | if (PageUptodate(page)) |
2069 | set_buffer_uptodate(bh); | 2071 | set_buffer_uptodate(bh); |
2070 | 2072 | ||
2071 | if (!buffer_uptodate(bh)) { | 2073 | if (!bh_uptodate_or_lock(bh)) { |
2072 | err = -EIO; | 2074 | err = bh_submit_read(bh); |
2073 | ll_rw_block(READ, 1, &bh); | ||
2074 | wait_on_buffer(bh); | ||
2075 | /* Uhhuh. Read error. Complain and punt. */ | 2075 | /* Uhhuh. Read error. Complain and punt. */ |
2076 | if (!buffer_uptodate(bh)) | 2076 | if (err) |
2077 | goto unlock; | 2077 | goto unlock; |
2078 | } | 2078 | } |
2079 | 2079 | ||