Interesting fact found by IFSTEST /t LockOverlappedTest...
authorJeremy Allison <jra@samba.org>
Thu, 26 Feb 2004 01:30:56 +0000 (01:30 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Feb 2004 01:30:56 +0000 (01:30 +0000)
Even if it's our own lock context, we need to wait here as
there may be an unlock on the way.
So I removed a "&& !my_lock_ctx" from the following
if statement.

if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {

Jeremy.

source/smbd/reply.c

index 49f4e97028267082e42777c0f504bafb4f2a760c..643b7c2d0810578f9a53c0d96fa6fd2a6955c0ba 100644 (file)
@@ -4357,7 +4357,14 @@ no oplock granted on this file (%s).\n", fsp->fnum, fsp->fsp_name));
                status = do_lock_spin(fsp,conn,lock_pid, count,offset, 
                                 ((locktype & 1) ? READ_LOCK : WRITE_LOCK), &my_lock_ctx);
                if (NT_STATUS_V(status)) {
-                       if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && !my_lock_ctx && ERROR_WAS_LOCK_DENIED(status)) {
+                       /*
+                        * Interesting fact found by IFSTEST /t LockOverlappedTest...
+                        * Even if it's our own lock context, we need to wait here as
+                        * there may be an unlock on the way.
+                        * So I removed a "&& !my_lock_ctx" from the following
+                        * if statement. JRA.
+                        */
+                       if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {
                                /*
                                 * A blocking lock was requested. Package up
                                 * this smb into a queued request and push it