From: Liu Bo Date: Fri, 3 Mar 2017 02:41:19 +0000 (-0800) Subject: Btrfs: remove ASSERT in btrfs_truncate_inode_items X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f95fda8751b7b243c810805d1deaae502716d8fb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Btrfs: remove ASSERT in btrfs_truncate_inode_items After 76b42abbf748 ("Btrfs: fix data loss after truncate when using the no-holes feature"), For either NO_HOLES or inline extents, we've set last_size to newsize to avoid data loss after remount or inode got evicted and read again, thus, we don't need this check anymore. Signed-off-by: Liu Bo Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5e71f1ea3391..568b28114f09 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4603,13 +4603,6 @@ error: btrfs_free_path(path); - if (err == 0) { - /* only inline file may have last_size != new_size */ - if (new_size >= fs_info->sectorsize || - new_size > fs_info->max_inline) - ASSERT(last_size == new_size); - } - if (be_nice && bytes_deleted > SZ_32M) { unsigned long updates = trans->delayed_ref_updates; if (updates) {