summaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-08-29 20:52:15 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-08-29 20:52:15 -0400
commit1c2150283cae895526d0db3953d13d139f4e7a03 (patch)
tree056daeae23f869aab5bbaec535ebe3eee5f19c35 /fs/ext4/inode.c
parent1056008226769fe982236c26038a095aeb47714b (diff)
ext4: convert ext4_bread() to use the ERR_PTR convention
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 0dfc1cd1eb52..8aa241a000c5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -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,