Repository navigation
Commit 5655b8b
smb3: do not error on fsync when readonly
[ Upstream commit 71e6864 ]
Linux allows doing a flush/fsync on a file open for read-only,
but the protocol does not allow that. If the file passed in
on the flush is read-only try to find a writeable handle for
the same inode, if that is not possible skip sending the
fsync call to the server to avoid breaking the apps.
Reported-by: Julian Sikorski <belegdol@gmail.com>
Tested-by: Julian Sikorski <belegdol@gmail.com>
Suggested-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent c380062 commit 5655b8b
1 file changed
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2618 | 2618 | | |
2619 | 2619 | | |
2620 | 2620 | | |
2621 | | - | |
2622 | | - | |
2623 | | - | |
| 2621 | + | |
2624 | 2622 | | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2625 | 2635 | | |
2626 | 2636 | | |
| 2637 | + | |
2627 | 2638 | | |
2628 | 2639 | | |
2629 | 2640 | | |
| |||
2635 | 2646 | | |
2636 | 2647 | | |
2637 | 2648 | | |
| 2649 | + | |
2638 | 2650 | | |
2639 | 2651 | | |
2640 | 2652 | | |
| |||
2651 | 2663 | | |
2652 | 2664 | | |
2653 | 2665 | | |
2654 | | - | |
2655 | | - | |
2656 | | - | |
| 2666 | + | |
2657 | 2667 | | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
2658 | 2680 | | |
2659 | 2681 | | |
| 2682 | + | |
2660 | 2683 | | |
2661 | 2684 | | |
2662 | 2685 | | |
| |||
0 commit comments