A client can:
- open a handle (h1)
- write some data to h1.
- open a 2nd handle h2 (downgrades both handles to level II)
- try to read the data on h2 (this gets old data)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10921
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Sun Nov 9 22:51:19 CET 2014 on sn-devel-104
sconn->oplocks.level_II_open++;
fsp->sent_oplock_break = NO_BREAK_SENT;
+ flush_write_cache(fsp, OPLOCK_RELEASE_FLUSH);
+ delete_write_cache(fsp);
+
TALLOC_FREE(fsp->oplock_timeout);
}