diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-30 07:28:29 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-30 07:28:29 +1000 |
commit | b33dba845e4e583a25c2f88b8439b8dde205dc89 (patch) | |
tree | 06ffb0f8862a799b4e52907f557d4b6eaa5ff3f4 /source4/ntvfs | |
parent | 2371de92a08a1fb63ba458bba3cee5a251419579 (diff) | |
download | samba-b33dba845e4e583a25c2f88b8439b8dde205dc89.tar.gz samba-b33dba845e4e583a25c2f88b8439b8dde205dc89.tar.bz2 samba-b33dba845e4e583a25c2f88b8439b8dde205dc89.zip |
don't emulate broken SMB2 locking behaviour from windows
(This used to be commit c50e7a15f9a7f2c5821b5ee468f9ade6eaa0ed55)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index baa92880f1..822b28246a 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -68,13 +68,8 @@ 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>=0;i--) { + for (i--;i>=0;i--) { brl_unlock(pvfs->brl_context, f->brl_handle, locks[i].pid, @@ -390,12 +385,9 @@ 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>=0;i--) { + for (i--;i>=0;i--) { brl_unlock(pvfs->brl_context, f->brl_handle, locks[i].pid, |