]> git.openpandora.org Git - pandora-kernel.git/commitdiff
ext4: convert ext4_bread() to use the ERR_PTR convention
authorTheodore Ts'o <tytso@mit.edu>
Sat, 30 Aug 2014 00:52:15 +0000 (20:52 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 30 Aug 2014 00:52:15 +0000 (20:52 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/namei.c
fs/ext4/super.c

index 0bb3f9ea08329a46d27f75160a6b42718fed6042..c24143ea9c08e4e38823a42cecfb102e6d8db710 100644 (file)
@@ -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,
diff --cc fs/ext4/ext4.h
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/ext4/namei.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge