s3: oplock: Fix race condition when closing an oplocked file.
commita8accc77ede273f3e9427612c18450d3c1f33666
authorJeremy Allison <jra@samba.org>
Wed, 10 Aug 2016 21:42:07 +0000 (10 14:42 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 13 Sep 2016 10:27:27 +0000 (13 12:27 +0200)
tree7025babe903d94158b802a2c2c2d975b8c608984
parentfc5f1029ac2f6dc1060d8bd6fab4bb160df7898d
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