1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r22864: in SMB2 mode we need to cancel an existing lock with a conflicting lock

if they're on the same handle and the same range

metze
This commit is contained in:
Stefan Metzmacher 2007-05-14 17:56:00 +00:00 committed by Gerald (Jerry) Carter
parent 83a61a2892
commit 36384bb4a0

View File

@ -69,8 +69,13 @@ static void pvfs_lock_async_failed(struct pvfs_state *pvfs,
int i,
NTSTATUS status)
{
/* in SMB2 mode we also try to unlock failing lock */
if (req->ctx->protocol != PROTOCOL_SMB2) {
i--;
}
/* undo the locks we just did */
for (i=i-1;i>=0;i--) {
for (;i>=0;i--) {
brl_unlock(pvfs->brl_context,
f->brl_handle,
locks[i].pid,
@ -377,8 +382,12 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
DLIST_ADD(f->pending_list, pending);
return NT_STATUS_OK;
}
/* in SMB2 mode we also try to unlock failing lock */
if (req->ctx->protocol != PROTOCOL_SMB2) {
i--;
}
/* undo the locks we just did */
for (i=i-1;i>=0;i--) {
for (;i>=0;i--) {
brl_unlock(pvfs->brl_context,
f->brl_handle,
locks[i].pid,