Commit 9c8b7a2
smb3: fix temporary data corruption in insert range
insert range doesn't discard the affected cached region
so can risk temporarily corrupting file data.
Also includes some minor cleanup (avoiding rereading
inode size repeatedly unnecessarily) to make it clearer.
Cc: stable@vger.kernel.org
Fixes: 7fe6fe9 ("cifs: add FALLOC_FL_INSERT_RANGE support")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent fa30a81 commit 9c8b7a2
1 file changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3722 | 3722 | | |
3723 | 3723 | | |
3724 | 3724 | | |
3725 | | - | |
| 3725 | + | |
3726 | 3726 | | |
3727 | 3727 | | |
3728 | 3728 | | |
3729 | | - | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
3730 | 3733 | | |
3731 | 3734 | | |
3732 | 3735 | | |
3733 | 3736 | | |
3734 | | - | |
3735 | | - | |
| 3737 | + | |
| 3738 | + | |
3736 | 3739 | | |
| 3740 | + | |
3737 | 3741 | | |
| 3742 | + | |
3738 | 3743 | | |
3739 | 3744 | | |
3740 | 3745 | | |
3741 | 3746 | | |
3742 | | - | |
| 3747 | + | |
3743 | 3748 | | |
3744 | 3749 | | |
3745 | 3750 | | |
3746 | | - | |
| 3751 | + | |
3747 | 3752 | | |
3748 | | - | |
| 3753 | + | |
3749 | 3754 | | |
3750 | | - | |
| 3755 | + | |
3751 | 3756 | | |
3752 | 3757 | | |
| 3758 | + | |
| 3759 | + | |
3753 | 3760 | | |
| 3761 | + | |
3754 | 3762 | | |
3755 | 3763 | | |
3756 | 3764 | | |
| |||
0 commit comments