Fix data corruption at oplock break handler. To avoid data corruption, we have to avoid changing the oplock value for a particular file until existing writer threads have quit. For that reason, we move the set_oplock_value to the oplock_break handler. Since the values used for the oplock break vary according to the protocol versions, we need to have protocol specific oplock_break handlers. I have successfully tested this against a reproducer we have for both SMB1 and SMB2. Sachin Prabhu (2): Add oplock_break to smb_version_operations cifs: Wait for writebacks to complete before attempting write. fs/cifs/cifsfs.c | 14 +++++++++- fs/cifs/cifsglob.h | 9 +++++-- fs/cifs/cifsproto.h | 5 ++++ fs/cifs/file.c | 69 ++++++++++++------------------------------------- fs/cifs/misc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++-- fs/cifs/smb1ops.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/smb2misc.c | 18 ++++++++++--- fs/cifs/smb2ops.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 264 insertions(+), 61 deletions(-) -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html