oplock don't conflict with invalid pid
authorStefan Metzmacher <metze@samba.org>
Mon, 13 Feb 2012 13:11:55 +0000 (14:11 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:41:36 +0000 (18:41 +0200)
source3/smbd/open.c

index 543a6619e9dec881e3f028cfb233cd4dc1971406..da34af2919b966939638956ab3f7dbc3fc9a30ab 100644 (file)
@@ -1165,6 +1165,11 @@ static bool delay_for_batch_oplocks(files_struct *fsp,
                return false;
        }
 
+       if (batch_entry->pid.pid == UINT64_MAX) {
+               /* TODO: clean up */
+               return false;
+       }
+
        /* Found a batch oplock */
        send_break_message(fsp, batch_entry, mid, oplock_request);
        return true;
@@ -1184,6 +1189,11 @@ static bool delay_for_exclusive_oplocks(files_struct *fsp,
                return false;
        }
 
+       if (ex_entry->pid.pid == UINT64_MAX) {
+               /* TODO: clean up */
+               return false;
+       }
+
        /* Found an exclusive or batch oplock */
 
        delay_it = is_delete_request(fsp) ?