smbd:smb2: grant a persistent open without a batch oplock.
authorMichael Adam <obnox@samba.org>
Wed, 22 Jan 2014 14:35:27 +0000 (15:35 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 9 May 2014 10:58:21 +0000 (12:58 +0200)
persistent handles on CA + scale-out shares are granted
without the request for batch oplocks (or handle leases).

source3/smbd/smb2_create.c

index 0cb35e0086fe2352e9f905bcbed5b7ca9f739638..f1ad26ea0d71f7afe297c37003c165732a63c7bd 100644 (file)
@@ -982,8 +982,9 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                        }
                }
 
-               if (durable_requested &&
-                   BATCH_OPLOCK_TYPE(result->oplock_type))
+               if (persistent_requested ||
+                   (durable_requested &&
+                    BATCH_OPLOCK_TYPE(result->oplock_type)))
                {
                        status = SMB_VFS_DURABLE_COOKIE(result,
                                                op,