Commit 3368597
btrfs: always update fstrim_range on failure in FITRIM ioctl
Even in case of failure we could've discarded some data and userspace
should be made aware of it, so copy fstrim_range to userspace
regardless.
Also make sure to update the trimmed bytes amount even if
btrfs_trim_free_extents fails.
CC: [email protected] # 5.15+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Luca Stefani <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent faad57a commit 3368597
2 files changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6551 | 6551 | | |
6552 | 6552 | | |
6553 | 6553 | | |
| 6554 | + | |
| 6555 | + | |
6554 | 6556 | | |
6555 | 6557 | | |
6556 | 6558 | | |
6557 | 6559 | | |
6558 | 6560 | | |
6559 | | - | |
6560 | | - | |
6561 | 6561 | | |
6562 | 6562 | | |
6563 | 6563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | | - | |
548 | 546 | | |
549 | 547 | | |
550 | 548 | | |
551 | 549 | | |
552 | | - | |
| 550 | + | |
553 | 551 | | |
554 | 552 | | |
555 | 553 | | |
| |||
0 commit comments