From: Volker Lendecke Date: Thu, 20 Mar 2014 13:36:11 +0000 (+0100) Subject: smbd: Explicitly pass "file_id" to schedule_defer_open X-Git-Tag: ldb-1.1.17~577 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=a5cd8a513f18336c3ab84867806631628a656f49;p=metze%2Fsamba-autobuild%2F.git smbd: Explicitly pass "file_id" to schedule_defer_open Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index f995c0bcae0..ba633b93954 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1738,6 +1738,7 @@ static NTSTATUS fcb_or_dos_open(struct smb_request *req, } static void schedule_defer_open(struct share_mode_lock *lck, + struct file_id id, struct timeval request_time, struct smb_request *req) { @@ -1768,7 +1769,7 @@ static void schedule_defer_open(struct share_mode_lock *lck, state.delayed_for_oplocks = True; state.async_open = false; - state.id = lck->data->id; + state.id = id; if (!request_timed_out(request_time, timeout)) { defer_open(lck, request_time, timeout, req, &state); @@ -2412,7 +2413,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, } if (delay_for_oplock(fsp, 0, lck, false, create_disposition)) { - schedule_defer_open(lck, request_time, req); + schedule_defer_open(lck, fsp->file_id, request_time, req); TALLOC_FREE(lck); DEBUG(10, ("Sent oplock break request to kernel " "oplock holder\n")); @@ -2525,7 +2526,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp, oplock_request, lck, NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION), create_disposition)) { - schedule_defer_open(lck, request_time, req); + schedule_defer_open(lck, fsp->file_id, request_time, req); TALLOC_FREE(lck); fd_close(fsp); return NT_STATUS_SHARING_VIOLATION;