Handle these failures in resize_inode, and handle the propagated error in the caller. Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> --- misc/tune2fs.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 6d879f3..346e2d1 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -1589,8 +1589,16 @@ static int resize_inode(ext2_filsys fs, unsigned long new_size) int new_ino_blks_per_grp; ext2fs_block_bitmap bmap; - ext2fs_read_inode_bitmap(fs); - ext2fs_read_block_bitmap(fs); + retval = ext2fs_read_inode_bitmap(fs); + if (retval) { + fputs(_("Failed to read inode bitmap\n"), stderr); + return retval; + } + retval = ext2fs_read_block_bitmap(fs); + if (retval) { + fputs(_("Failed to read blockbitmap\n"), stderr); + return retval; + } INIT_LIST_HEAD(&blk_move_list); @@ -1989,6 +1997,9 @@ retry_open: if (resize_inode(fs, new_inode_size) == 0) { printf(_("Setting inode size %lu\n"), new_inode_size); + } else { + printf(_("Failed to change inode size\n")); + exit(1); } } -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html