From: Volker Lendecke Date: Sat, 2 Oct 2010 15:07:00 +0000 (+0200) Subject: s3: Stop using the write cache after an oplock break X-Git-Tag: samba-3.4.10~22 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=fc80176d53a35c5e0d188c82f3cc301106c87671 s3: Stop using the write cache after an oplock break Fix bug #7715 (Setting Samba Write Cache Size Can Cause File Corruption). (cherry picked from commit 9f8292e5f765dff586bfbb261b54da4d4b27a837) (cherry picked from commit e18ef6cdf042a73e7f08b792e4a9901b071b1f67) --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 086ce1ac23e..e690276b277 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -118,6 +118,7 @@ void release_file_oplock(files_struct *fsp) fsp->sent_oplock_break = NO_BREAK_SENT; flush_write_cache(fsp, OPLOCK_RELEASE_FLUSH); + delete_write_cache(fsp); TALLOC_FREE(fsp->oplock_timeout); }