r3035: if the ntvfs layers prior to us have said that we can't perform an
authorAndrew Tridgell <tridge@samba.org>
Mon, 18 Oct 2004 12:06:21 +0000 (12:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:00:00 +0000 (13:00 -0500)
operation asynchronously (such as the nbench module), then ignore lock
timeouts, as they would make no sense
(This used to be commit 2894dd0ac0ddd0ae5b4d536d5cff0690bbfab1a0)

source4/ntvfs/posix/pvfs_lock.c

index ead1371ebc1e58b5e29521ef51f840d1381b3cac..e32fcb2e3a44e2b1ef64456081766b4c527aca9f 100644 (file)
@@ -295,7 +295,8 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
        }
 
        /* now the lockingX case, most common and also most complex */
-       if (lck->lockx.in.timeout != 0) {
+       if (lck->lockx.in.timeout != 0 && 
+           req->async.send_fn) {
                pending = talloc_p(req, struct pvfs_pending_lock);
                if (pending == NULL) {
                        return NT_STATUS_NO_MEMORY;