Repository navigation
Commit 3ed9f22
CIFS: Do not reset lease state to NONE on lease break
commit 7b9b9ed upstream.
Currently on lease break the client sets a caching level twice:
when oplock is detected and when oplock is processed. While the
1st attempt sets the level to the value provided by the server,
the 2nd one resets the level to None unconditionally.
This happens because the oplock/lease processing code was changed
to avoid races between page cache flushes and oplock breaks.
The commit c11f1df ("cifs: Wait for writebacks to complete
before attempting write.") fixed the races for oplocks but didn't
apply the same changes for leases resulting in overwriting the
server granted value to None. Fix this by properly processing
lease breaks.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 41e2d1c commit 3ed9f22
2 files changed
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
| |||
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
540 | | - | |
541 | | - | |
542 | 539 | | |
543 | 540 | | |
544 | 541 | | |
545 | 542 | | |
546 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
547 | 558 | | |
548 | 559 | | |
549 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2300 | 2300 | | |
2301 | 2301 | | |
2302 | 2302 | | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
2303 | 2312 | | |
2304 | 2313 | | |
2305 | 2314 | | |
| |||
3351 | 3360 | | |
3352 | 3361 | | |
3353 | 3362 | | |
3354 | | - | |
| 3363 | + | |
3355 | 3364 | | |
3356 | 3365 | | |
3357 | 3366 | | |
| |||
3447 | 3456 | | |
3448 | 3457 | | |
3449 | 3458 | | |
3450 | | - | |
| 3459 | + | |
3451 | 3460 | | |
3452 | 3461 | | |
3453 | 3462 | | |
| |||
3551 | 3560 | | |
3552 | 3561 | | |
3553 | 3562 | | |
3554 | | - | |
| 3563 | + | |
3555 | 3564 | | |
3556 | 3565 | | |
3557 | 3566 | | |
| |||
0 commit comments