]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use "req->request_time" in defer_open()
authorVolker Lendecke <vl@samba.org>
Thu, 1 Aug 2019 14:42:59 +0000 (16:42 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2019 21:49:27 +0000 (21:49 +0000)
Both callers passed that in.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 2adfaf04cc7f649555536f3154aeb880aebaa4bf..e90d467fcc7ca8ac7e6df0fe74a473631b0e40c1 100644 (file)
@@ -2416,7 +2416,6 @@ static void defer_open_done(struct tevent_req *req);
  * sharing violation delay.
  **/
 static void defer_open(struct share_mode_lock *lck,
-                      struct timeval request_time,
                       struct timeval timeout,
                       struct smb_request *req,
                       bool delayed_for_oplocks,
@@ -2428,11 +2427,11 @@ static void defer_open(struct share_mode_lock *lck,
        struct tevent_req *watch_req;
        bool ok;
 
-       abs_timeout = timeval_sum(&request_time, &timeout);
+       abs_timeout = timeval_sum(&req->request_time, &timeout);
 
        DBG_DEBUG("request time [%s] timeout [%s] mid [%" PRIu64 "] "
                  "delayed_for_oplocks [%s] file_id [%s]\n",
-                 timeval_string(talloc_tos(), &request_time, false),
+                 timeval_string(talloc_tos(), &req->request_time, false),
                  timeval_string(talloc_tos(), &abs_timeout, false),
                  req->mid,
                  delayed_for_oplocks ? "yes" : "no",
@@ -2469,7 +2468,7 @@ static void defer_open(struct share_mode_lock *lck,
                exit_server("tevent_req_set_endtime failed");
        }
 
-       ok = push_deferred_open_message_smb(req, request_time, timeout,
+       ok = push_deferred_open_message_smb(req, req->request_time, timeout,
                                            open_rec->id, open_rec);
        if (!ok) {
                TALLOC_FREE(lck);
@@ -2642,7 +2641,7 @@ static void schedule_defer_open(struct share_mode_lock *lck,
                return;
        }
 
-       defer_open(lck, req->request_time, timeout, req, true, id);
+       defer_open(lck, timeout, req, true, id);
 }
 
 /****************************************************************************
@@ -3542,12 +3541,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                        timeout = timeval_set(0, timeout_usecs);
 
                        if (!request_timed_out(req->request_time, timeout)) {
-                               defer_open(lck,
-                                          req->request_time,
-                                          timeout,
-                                          req,
-                                          false,
-                                          id);
+                               defer_open(lck, timeout, req, false, id);
                        }
                }