s3: oplock: Fix race condition when closing an oplocked file.
commitdf83b17c60a08a27a7ddd1d88dc125e15b3ee06d
authorJeremy Allison <jra@samba.org>
Wed, 10 Aug 2016 21:42:07 +0000 (10 14:42 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 11 Aug 2016 17:55:12 +0000 (11 19:55 +0200)
treeec4bc08c2c9ab56e81d8d19b5430aaa6c3f275be
parentcb394abe5206dd8ad8a68f157427991b259129a7
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>
source3/smbd/close.c