+30
−6
+36
−21
+12
−4
+5
−5
+26
−18
Loading
Customer reported data corruption in some of their files. It turned out the client would end up calling cacheless IO functions while having RHW lease, bypassing the pagecache and then leaving gaps in the file while writing to it. It was related to concurrent opens changing the lease state while having writes in flight. Lease breaks and re-opens due to reconnect could also cause same issue. Fix this by serialising the lease updates with cifsInodeInfo::open_file_lock. When handling oplock break, make sure to use the downgraded oplock value rather than one in cifsInodeinfo as it could be changed concurrently. Reported-by:Frank Sorenson <sorenson@redhat.com> Signed-off-by:
Paulo Alcantara (Red Hat) <pc@manguebit.org> Reviewed-by:
David Howells <dhowells@redhat.com> Cc: linux-cifs@vger.kernel.org Signed-off-by:
Steve French <stfrench@microsoft.com>