]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use "req->request_time" in schedule_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 c97fbcfa2d8f69a7e2cca5551718742a5040ed8a..2adfaf04cc7f649555536f3154aeb880aebaa4bf 100644 (file)
@@ -2618,7 +2618,6 @@ static bool open_match_attributes(connection_struct *conn,
 
 static void schedule_defer_open(struct share_mode_lock *lck,
                                struct file_id id,
-                               struct timeval request_time,
                                struct smb_request *req)
 {
        /* This is a relative time, added to the absolute
@@ -2639,11 +2638,11 @@ static void schedule_defer_open(struct share_mode_lock *lck,
 
        timeout = timeval_set(OPLOCK_BREAK_TIMEOUT*2, 0);
 
-       if (request_timed_out(request_time, timeout)) {
+       if (request_timed_out(req->request_time, timeout)) {
                return;
        }
 
-       defer_open(lck, request_time, timeout, req, true, id);
+       defer_open(lck, req->request_time, timeout, req, true, id);
 }
 
 /****************************************************************************
@@ -3341,11 +3340,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                                         create_disposition,
                                         first_open_attempt);
                if (delay) {
-                       schedule_defer_open(
-                               lck,
-                               fsp->file_id,
-                               req->request_time,
-                               req);
+                       schedule_defer_open(lck, fsp->file_id, req);
                        TALLOC_FREE(lck);
                        DEBUG(10, ("Sent oplock break request to kernel "
                                   "oplock holder\n"));
@@ -3479,8 +3474,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                                         create_disposition,
                                         first_open_attempt);
                if (delay) {
-                       schedule_defer_open(
-                               lck, fsp->file_id, req->request_time, req);
+                       schedule_defer_open(lck, fsp->file_id, req);
                        TALLOC_FREE(lck);
                        fd_close(fsp);
                        return NT_STATUS_SHARING_VIOLATION;