Revert "WORKS BUT NOT NEEDED s3:smbd: allow cancelling deferred SMB1 opens"
[metze/samba/wip.git] / source3 / smbd / open.c
index a8c7b235c715058be04f30da6be9be83f31b05f1..bab9286751f5e5dc325f484c02ecca446ab4749f 100644 (file)
@@ -45,7 +45,6 @@ extern const struct generic_mapping file_generic_mapping;
 struct deferred_open_record {
         bool delayed_for_oplocks;
        bool async_open;
-       bool cancelled;
         struct file_id id;
 
        /*
@@ -2845,21 +2844,6 @@ bool is_deferred_open_async(const struct deferred_open_record *rec)
        return rec->async_open;
 }
 
-bool cancel_open_async(struct deferred_open_record *rec)
-{
-       if (rec->cancelled) {
-               return false;
-       }
-
-       if (is_deferred_open_async(rec)) {
-               /* Can't cancel an async create. */
-               return false;
-       }
-
-       rec->cancelled = true;
-       return true;
-}
-
 static bool clear_ads(uint32_t create_disposition)
 {
        bool ret = false;
@@ -3085,10 +3069,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                        /* Ensure we don't reprocess this message. */
                        remove_deferred_open_message_smb(req->xconn, req->mid);
 
-                       if (open_rec->cancelled) {
-                               return NT_STATUS_CANCELLED;
-                       }
-
                        first_open_attempt = false;
                }
        }