From 92a2f80e19abdbcbc83bf8f55eae9c7cdfa538e2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 2 Oct 2010 17:07:00 +0200 Subject: [PATCH] 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. --- source3/smbd/oplock.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.34.1