s3: smbd: Locking - convert to using utility macro used elsewhere.
authorJeremy Allison <jra@samba.org>
Thu, 3 Jul 2014 00:25:22 +0000 (17:25 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sun, 13 Jul 2014 19:29:19 +0000 (21:29 +0200)
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 517fa80bd385c6adcfee03ea6b25599013ad88f5)

source3/smbd/blocking.c

index 100944cad84839dfafd15da9cf8698e59c34895a..fde3143eab8024e611ffc42287e391c0fb088477 100644 (file)
@@ -500,8 +500,7 @@ static bool process_lockingX(struct blocking_lock_record *blr)
                return True;
        }
 
-       if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) &&
-           !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) {
+       if (!ERROR_WAS_LOCK_DENIED(status)) {
                /*
                 * We have other than a "can't get lock"
                 * error. Free any locks we had and return an error.