s3: oplock: Fix race condition when closing an oplocked file.
commit811fd8bbdb4ae424c3b43d8498946312434ce3b2
authorJeremy Allison <jra@samba.org>
Wed, 10 Aug 2016 21:42:07 +0000 (10 14:42 -0700)
committerStefan Metzmacher <metze@samba.org>
Wed, 24 Aug 2016 09:42:25 +0000 (24 11:42 +0200)
tree17be5b471ea7b01c72b77eb3bf1a99f55fb74b9e
parenta36549c88dbf566c07a71ce23e0cbaafa1661248
s3: oplock: Fix race condition when closing an oplocked file.

We must send the 'oplock released' message whilst the lock
is held in the close path. Otherwise the messaged smbd can
race with the share mode delete.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit df83b17c60a08a27a7ddd1d88dc125e15b3ee06d)
source3/smbd/close.c