Commit fa30a81
committed
smb3: fix temporary data corruption in collapse range
collapse range doesn't discard the affected cached region
so can risk temporarily corrupting the file data. This
fixes xfstest generic/031
I also decided to merge a minor cleanup to this into the same patch
(avoiding rereading inode size repeatedly unnecessarily) to make it
clearer.
Cc: stable@vger.kernel.org
Fixes: 5476b5d ("cifs: add support for FALLOC_FL_COLLAPSE_RANGE")
Reported-by: David Howells <dhowells@redhat.com>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
cc: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent c3a72bb commit fa30a81
1 file changed
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3669 | 3669 | | |
3670 | 3670 | | |
3671 | 3671 | | |
3672 | | - | |
| 3672 | + | |
3673 | 3673 | | |
3674 | | - | |
| 3674 | + | |
3675 | 3675 | | |
| 3676 | + | |
3676 | 3677 | | |
3677 | 3678 | | |
3678 | 3679 | | |
3679 | | - | |
3680 | | - | |
| 3680 | + | |
3681 | 3681 | | |
3682 | | - | |
3683 | | - | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
3684 | 3685 | | |
3685 | 3686 | | |
3686 | 3687 | | |
3687 | 3688 | | |
| 3689 | + | |
3688 | 3690 | | |
| 3691 | + | |
3689 | 3692 | | |
3690 | 3693 | | |
3691 | | - | |
| 3694 | + | |
3692 | 3695 | | |
3693 | | - | |
| 3696 | + | |
3694 | 3697 | | |
3695 | | - | |
| 3698 | + | |
3696 | 3699 | | |
3697 | 3700 | | |
3698 | 3701 | | |
3699 | | - | |
| 3702 | + | |
3700 | 3703 | | |
3701 | 3704 | | |
3702 | 3705 | | |
3703 | 3706 | | |
3704 | 3707 | | |
3705 | 3708 | | |
| 3709 | + | |
| 3710 | + | |
3706 | 3711 | | |
| 3712 | + | |
3707 | 3713 | | |
3708 | 3714 | | |
3709 | 3715 | | |
| |||
0 commit comments