提交 f95fda87 编写于 作者: L Liu Bo 提交者: David Sterba

Btrfs: remove ASSERT in btrfs_truncate_inode_items

After 76b42abb ("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: NLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 14506127
......@@ -4603,13 +4603,6 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册