Unverified Commit 42340f1c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents 1ab74ffe 48e5a75d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1161,6 +1161,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
					     locked_page,
					     clear_bits,
					     page_ops);
		btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size);
		start += cur_alloc_size;
		if (start >= end)
			goto out;
@@ -1168,6 +1169,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
	extent_clear_unlock_delalloc(inode, start, end, locked_page,
				     clear_bits | EXTENT_CLEAR_DATA_RESV,
				     page_ops);
	btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size);
	goto out;
}

@@ -1777,7 +1779,7 @@ static noinline int run_delalloc_nocow(struct btrfs_inode *inode,
	if (nocow)
		btrfs_dec_nocow_writers(fs_info, disk_bytenr);

	if (ret && cur_offset < end)
	if (ret && cur_offset < end) {
		extent_clear_unlock_delalloc(inode, cur_offset, end,
					     locked_page, EXTENT_LOCKED |
					     EXTENT_DELALLOC | EXTENT_DEFRAG |
@@ -1785,6 +1787,8 @@ static noinline int run_delalloc_nocow(struct btrfs_inode *inode,
					     PAGE_CLEAR_DIRTY |
					     PAGE_SET_WRITEBACK |
					     PAGE_END_WRITEBACK);
		btrfs_qgroup_free_data(inode, NULL, cur_offset, end - cur_offset + 1);
	}
	btrfs_free_path(path);
	return ret;
}