Re: [PATCH 6/8] ext4: make the bitmap read routines return real error codes
From: Theodore Ts'o <tytso@mit.edu>
Date: 2015-10-15 14:57:31
From: Theodore Ts'o <tytso@mit.edu>
Date: 2015-10-15 14:57:31
On Mon, Oct 12, 2015 at 02:54:58PM -0700, Darrick J. Wong wrote:
* Return buffer_head on success or NULL in case of failure. */ -struct buffer_head * -ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group) +int +ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group, + struct buffer_head **bbh)
Is there a reason why you didn't use the ERR_PTR convention?
-struct buffer_head * -ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group) +int +ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group, + struct buffer_head **bbh)
And here....
* Return buffer_head of bitmap on success or NULL.
*/
-static struct buffer_head *
-ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
+static int
+ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group,
+ struct buffer_head **bbh)
{And here.... - Ted