From: Darrick J. Wong Date: Sun, 10 Aug 2014 22:40:21 +0000 (-0400) Subject: e2fsck: don't try to iterate blocks of an inline_data inode when deallocating it X-Git-Tag: v1.43-WIP-2015-05-18~233 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ece839011f3074c2249dcfbf99945c93cc1927d;p=thirdparty%2Fe2fsprogs.git e2fsck: don't try to iterate blocks of an inline_data inode when deallocating it Inodes with inline_data set do not have iterable blocks, so don't try to iterate the blocks, because that will just fail, causing e2fsck to abort. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c index 38bf37a32..d56b4c84e 100644 --- a/e2fsck/pass2.c +++ b/e2fsck/pass2.c @@ -1441,6 +1441,10 @@ static void deallocate_inode(e2fsck_t ctx, ext2_ino_t ino, char* block_buf) if (!ext2fs_inode_has_valid_blocks2(fs, &inode)) goto clear_inode; + /* Inline data inodes don't have blocks to iterate */ + if (inode.i_flags & EXT4_INLINE_DATA_FL) + goto clear_inode; + if (LINUX_S_ISREG(inode.i_mode) && ext2fs_needs_large_file_feature(EXT2_I_SIZE(&inode))) ctx->large_files--;