Commit 71e6864
committed
smb3: do not error on fsync when readonly
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 <[email protected]>
Tested-by: Julian Sikorski <[email protected]>
Suggested-by: Jeremy Allison <[email protected]>
Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
Signed-off-by: Steve French <[email protected]>1 parent b6f2a0f commit 71e6864
1 file changed
+29
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2692 | 2692 | | |
2693 | 2693 | | |
2694 | 2694 | | |
2695 | | - | |
2696 | | - | |
2697 | | - | |
| 2695 | + | |
2698 | 2696 | | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
2699 | 2709 | | |
2700 | 2710 | | |
| 2711 | + | |
2701 | 2712 | | |
2702 | 2713 | | |
2703 | 2714 | | |
| |||
2709 | 2720 | | |
2710 | 2721 | | |
2711 | 2722 | | |
| 2723 | + | |
2712 | 2724 | | |
2713 | 2725 | | |
2714 | 2726 | | |
| |||
2725 | 2737 | | |
2726 | 2738 | | |
2727 | 2739 | | |
2728 | | - | |
2729 | | - | |
2730 | | - | |
| 2740 | + | |
2731 | 2741 | | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
2732 | 2754 | | |
2733 | 2755 | | |
| 2756 | + | |
2734 | 2757 | | |
2735 | 2758 | | |
2736 | 2759 | | |
| |||
0 commit comments