Skip to content

Commit 9033783

Browse files
joshtripletttytso
authored andcommitted
ext4: fix return-value types in several function comments
The documentation comments for ext4_read_block_bitmap_nowait and ext4_read_inode_bitmap describe them as returning NULL on error, but they return an ERR_PTR on error; update the documentation to match. The documentation comment for ext4_wait_block_bitmap describes it as returning 1 on error, but it returns -errno on error; update the documentation to match. Signed-off-by: Josh Triplett <[email protected]> Reviewed-by: Ritesh Harani <[email protected]> Link: https://lore.kernel.org/r/60a3f4996f4932c45515aaa6b75ca42f2a78ec9b.1585512514.git.josh@joshtriplett.org Signed-off-by: Theodore Ts'o <[email protected]>
1 parent d87f639 commit 9033783

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fs/ext4/balloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ static int ext4_validate_block_bitmap(struct super_block *sb,
410410
* Read the bitmap for a given block_group,and validate the
411411
* bits for block/inode/inode tables are set in the bitmaps
412412
*
413-
* Return buffer_head on success or NULL in case of failure.
413+
* Return buffer_head on success or an ERR_PTR in case of failure.
414414
*/
415415
struct buffer_head *
416416
ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group)
@@ -502,7 +502,7 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group)
502502
return ERR_PTR(err);
503503
}
504504

505-
/* Returns 0 on success, 1 on error */
505+
/* Returns 0 on success, -errno on error */
506506
int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group,
507507
struct buffer_head *bh)
508508
{

fs/ext4/ialloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
113113
* Read the inode allocation bitmap for a given block_group, reading
114114
* into the specified slot in the superblock's bitmap cache.
115115
*
116-
* Return buffer_head of bitmap on success or NULL.
116+
* Return buffer_head of bitmap on success, or an ERR_PTR on error.
117117
*/
118118
static struct buffer_head *
119119
ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)

0 commit comments

Comments
 (0)