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)
committerVolker Lendecke <vl@samba.org>
Thu, 7 Oct 2010 08:27:28 +0000 (10:27 +0200)
This fixes samba-bug 7715: If "write cache size" is set (a typical tuning knob
that might be applied in critical customer situations by performance experts),
smbd can corrupt data. This fixes it.

source3/smbd/oplock.c

index e9b2a6cf95f14dd92c087a8c21b22351357fd4a3..4e5f673cd208626b1c1091a88f48703a205ccf38 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);
 }