When using the FIDEDUPRANGE ioctl, in case of success the requested size is returned. In some cases this might not be the actual amount of bytes deduplicated. This change modifies vfs_dedupe_file_range() to report the actual amount of bytes deduplicated, instead of the requested amount.
Unified · Split
| @@ -547,7 +547,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same) · 546 unmodified lines | ||
| 547 | 547 | else if (deduped < 0) |
| 548 | 548 | info->status = deduped; |
| 549 | 549 | else |
| 550 | − info->bytes_deduped = len; | |
| 550 | + info->bytes_deduped = deduped; | |
| 551 | 551 | |
| 552 | 552 | next_fdput: |
| 553 | 553 | fdput(dst_fd); |