s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and...
commit6207d7f17c5d8d2c32e096d7383770f147d1776a
authorJeremy Allison <jra@samba.org>
Thu, 3 Jul 2014 03:51:24 +0000 (2 20:51 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sun, 13 Jul 2014 19:29:20 +0000 (13 21:29 +0200)
tree01d0a0a5d9b1219639bd4d28644165ecf9dc8f07
parentb1be3eb040647e756eef4722d39e6d32e0f90c5f
s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and the lock hasn't timed out).

Keep the blocking lock record and the pending lock records consistent
if we are dealing with multiple blocking lock requests in one SMB1 LockingX
request.

Ensure we re-add the records under the record lock, to avoid race
conditions.

Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit 954401f8b2b16b3e2ef9655e8ce94d657becce36)
source3/smbd/blocking.c