diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 46eedf8efbce..c0c96a8fc032 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1310,7 +1310,8 @@ static int ext4_write_end(struct file *file, trace_android_fs_datawrite_end(inode, pos, len); trace_ext4_write_end(inode, pos, len, copied); - if (ext4_has_inline_data(inode)) + if (ext4_has_inline_data(inode) && + ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) return ext4_write_inline_data_end(inode, pos, len, copied, page); copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);