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-Url: http://git.samba.org/?p=obnox%2Fsamba-ctdb.git;a=commitdiff_plain;h=92a2f80e19abdbcbc83bf8f55eae9c7cdfa538e2 s3: Stop using the write cache after an oplock break 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. --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index e9b2a6cf95..4e5f673cd2 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); }