From: Theodore Ts'o Date: Sat, 30 Aug 2014 00:52:15 +0000 (-0400) Subject: ext4: convert ext4_bread() to use the ERR_PTR convention X-Git-Tag: fixes-against-v3.18-rc2~28^2~64 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c2150283cae895526d0db3953d13d139f4e7a03;p=pandora-kernel.git ext4: convert ext4_bread() to use the ERR_PTR convention Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 0bb3f9ea0832..c24143ea9c08 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -151,13 +151,11 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx) &file->f_ra, file, index, 1); file->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT; - bh = ext4_bread(NULL, inode, map.m_lblk, 0, &err); + bh = ext4_bread(NULL, inode, map.m_lblk, 0); + if (IS_ERR(bh)) + return PTR_ERR(bh); } - /* - * We ignore I/O errors on directories so users have a chance - * of recovering data when there's a bad sector - */ if (!bh) { if (!dir_has_error) { EXT4_ERROR_FILE(file, 0, Reading git-diff-tree failed