s3: Stop using the write cache after an oplock break
authorVolker Lendecke <vl@samba.org>
Sat, 2 Oct 2010 15:07:00 +0000 (17:07 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 13 Jan 2011 16:58:51 +0000 (17:58 +0100)
Fix bug #7715 (Setting Samba Write Cache Size Can Cause File Corruption).
(cherry picked from commit 9f8292e5f765dff586bfbb261b54da4d4b27a837)
(cherry picked from commit e18ef6cdf042a73e7f08b792e4a9901b071b1f67)

source3/smbd/oplock.c

index 086ce1ac23ed9a77a03f6c4c40118e8cef4f9534..e690276b277d30b2759ec39c94164773db9e97e9 100644 (file)
@@ -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);
 }