summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/ntvfs_generic.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 05fb0df47b..aa3009d86e 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -999,7 +999,11 @@ _PUBLIC_ NTSTATUS ntvfs_map_lock(struct ntvfs_module_context *ntvfs,
} else {
lck2->generic.in.mode = LOCKING_ANDX_SHARED_LOCK;
}
- lck2->generic.in.timeout = 0;
+ if (lck->smb2.in.flags & SMB2_LOCK_FLAG_NO_PENDING) {
+ lck2->generic.in.timeout = 0;
+ } else {
+ lck2->generic.in.timeout = UINT32_MAX;
+ }
if (lck->smb2.in.flags & SMB2_LOCK_FLAG_UNLOCK) {
lck2->generic.in.ulock_cnt = 1;
lck2->generic.in.lock_cnt = 0;