Commit 488968a
cifs: fix fallocate when trying to allocate a hole.
Remove the conditional checking for out_data_len and skipping the fallocate
if it is 0. This is wrong will actually change any legitimate the fallocate
where the entire region is unallocated into a no-op.
Additionally, before allocating the range, if FALLOC_FL_KEEP_SIZE is set then
we need to clamp the length of the fallocate region as to not extend the size of the file.
Fixes: 966a3cb ("cifs: improve fallocate emulation")
Signed-off-by: Ronnie Sahlberg <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent 7b09d4e commit 488968a
1 file changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3667 | 3667 | | |
3668 | 3668 | | |
3669 | 3669 | | |
3670 | | - | |
3671 | | - | |
3672 | | - | |
3673 | | - | |
3674 | | - | |
3675 | 3670 | | |
3676 | 3671 | | |
3677 | 3672 | | |
| |||
3794 | 3789 | | |
3795 | 3790 | | |
3796 | 3791 | | |
| 3792 | + | |
| 3793 | + | |
| 3794 | + | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
3797 | 3810 | | |
3798 | 3811 | | |
3799 | 3812 | | |
| |||
0 commit comments