ext4: convert ext4_bread() to use the ERR_PTR convention
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -791,27 +791,21 @@ errout:
|
||||
}
|
||||
|
||||
struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
|
||||
ext4_lblk_t block, int create, int *err)
|
||||
ext4_lblk_t block, int create)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
|
||||
*err = 0;
|
||||
bh = ext4_getblk(handle, inode, block, create);
|
||||
if (IS_ERR(bh)) {
|
||||
*err = PTR_ERR(bh);
|
||||
return NULL;
|
||||
}
|
||||
if (!bh)
|
||||
if (IS_ERR(bh))
|
||||
return bh;
|
||||
if (buffer_uptodate(bh))
|
||||
if (!bh || buffer_uptodate(bh))
|
||||
return bh;
|
||||
ll_rw_block(READ | REQ_META | REQ_PRIO, 1, &bh);
|
||||
wait_on_buffer(bh);
|
||||
if (buffer_uptodate(bh))
|
||||
return bh;
|
||||
put_bh(bh);
|
||||
*err = -EIO;
|
||||
return NULL;
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
|
||||
int ext4_walk_page_buffers(handle_t *handle,
|
||||
|
Reference in New Issue
Block a user