Message ID | 20241025065448.3231672-2-haisuwang@tencent.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: fix the length of reserved qgroup to free | expand |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5618ca02934a..3646734a7e59 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1618,7 +1618,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode, clear_bits |= EXTENT_CLEAR_DATA_RESV; extent_clear_unlock_delalloc(inode, start, end, locked_folio, &cached, clear_bits, page_ops); - btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size, NULL); + btrfs_qgroup_free_data(inode, NULL, start, end - start + 1, NULL); } return ret; }