From: Ralph Boehme Date: Wed, 31 Oct 2018 09:21:31 +0000 (+0100) Subject: s3:smbd: remove now unused check if fsp is NULL X-Git-Tag: samba-4.8.8~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce25e5735344cd242d822ab26aa9b241dd375362;p=thirdparty%2Fsamba.git s3:smbd: remove now unused check if fsp is NULL This was used internally to mark an aio request as cancelled. As the aio cancellation functionality has been removed, we can now also remove this check. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13667 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 3fa45900c0ada6596daf09aa4c5054974f3394b0) --- diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index a7540ed7b91..b0a5c76ac7a 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -773,14 +773,6 @@ static void aio_pread_smb2_done(struct tevent_req *req) DEBUG(10, ("pread_recv returned %d, err = %s\n", (int)nread, (nread == -1) ? strerror(vfs_aio_state.error) : "no error")); - if (fsp == NULL) { - DEBUG(3, ("%s: request cancelled (mid[%ju])\n", - __func__, (uintmax_t)aio_ex->smbreq->mid)); - TALLOC_FREE(aio_ex); - tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR); - return; - } - /* Common error or success code processing for async or sync read returns. */ @@ -938,14 +930,6 @@ static void aio_pwrite_smb2_done(struct tevent_req *req) DEBUG(10, ("pwrite_recv returned %d, err = %s\n", (int)nwritten, (nwritten == -1) ? strerror(err) : "no error")); - if (fsp == NULL) { - DEBUG(3, ("%s: request cancelled (mid[%ju])\n", - __func__, (uintmax_t)aio_ex->smbreq->mid)); - TALLOC_FREE(aio_ex); - tevent_req_nterror(subreq, NT_STATUS_INTERNAL_ERROR); - return; - } - mark_file_modified(fsp); status = smb2_write_complete_nosync(subreq, nwritten, err);