Signed-off-by: Qu Wenruo <w...@suse.com>
---
 convert/source-ext2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/convert/source-ext2.c b/convert/source-ext2.c
index b1492c78693d..e13fbe00415a 100644
--- a/convert/source-ext2.c
+++ b/convert/source-ext2.c
@@ -310,7 +310,7 @@ static int ext2_create_file_extents(struct 
btrfs_trans_handle *trans,
        if (ret)
                goto fail;
        if ((convert_flags & CONVERT_FLAG_INLINE_DATA) && data.first_block == 0
-           && data.num_blocks > 0
+           && data.num_blocks > 0 && inode_size < sectorsize
            && inode_size <= BTRFS_MAX_INLINE_DATA_SIZE(root->fs_info)) {
                u64 num_bytes = data.num_blocks * sectorsize;
                u64 disk_bytenr = data.disk_block * sectorsize;
-- 
2.16.2

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to