s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and...
commit2f118b639cf1eb1579b8554d42b18b31a5b222dd
authorJeremy Allison <jra@samba.org>
Thu, 3 Jul 2014 03:51:24 +0000 (2 20:51 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:16 +0000 (15 12:46 +0200)
tree62cfa34cd47d78cfef398cba90c82a3efac39dc6
parent01753e8409497f8f82dd637a0ad8402da9464d5c
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