s3: smb2: Remove unused code from remove_pending_lock().
authorJeremy Allison <jra@samba.org>
Thu, 26 Jun 2014 00:10:45 +0000 (17:10 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 30 Jun 2014 10:41:10 +0000 (12:41 +0200)
SMB2 blocking locks can only have one lock per request, so
there can never be any previous locks to remove.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/smb2_lock.c

index 5da14e9c2dda899d7fe57e97762773ae2e4f3eb7..1236f4feea9ff8f05158597452fec67b01c61249 100644 (file)
@@ -664,19 +664,6 @@ static void remove_pending_lock(struct smbd_smb2_lock_state *state,
                                blr);
                TALLOC_FREE(br_lck);
        }
-
-       /* Remove the locks we already got. */
-
-       for(i = blr->lock_num - 1; i >= 0; i--) {
-               struct smbd_lock_element *e = &state->locks[i];
-
-               do_unlock(blr->fsp->conn->sconn->msg_ctx,
-                       blr->fsp,
-                       e->smblctx,
-                       e->count,
-                       e->offset,
-                       WINDOWS_LOCK);
-       }
 }
 
 /****************************************************************