From: Jeremy Allison Date: Wed, 18 Mar 2020 23:01:18 +0000 (-0700) Subject: s3: smbd: Remove all references to fsp->deferred_close. X-Git-Tag: ldb-2.2.0~1290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76b9a3597c93daefbaa4031e6ab9f136e8aeaece;p=thirdparty%2Fsamba.git s3: smbd: Remove all references to fsp->deferred_close. We are now free to remove it from struct files_struct. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/offload_token.c b/source3/modules/offload_token.c index 03bb3309f38..c562f1bab0b 100644 --- a/source3/modules/offload_token.c +++ b/source3/modules/offload_token.c @@ -270,16 +270,6 @@ NTSTATUS vfs_offload_token_check_handles(uint32_t fsctl, return NT_STATUS_ACCESS_DENIED; } - if (src_fsp->deferred_close != NULL) { - DBG_INFO("copy chunk src handle with deferred close.\n"); - return NT_STATUS_ACCESS_DENIED; - } - - if (dst_fsp->deferred_close != NULL) { - DBG_INFO("copy chunk dst handle with deferred close.\n"); - return NT_STATUS_ACCESS_DENIED; - } - if (src_fsp->closing) { DBG_INFO("copy chunk src handle with closing in progress.\n"); return NT_STATUS_ACCESS_DENIED; diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index cf35f3297ec..30a8c0eb04f 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -102,7 +102,6 @@ static int aio_del_req_from_fsp(struct aio_req_fsp_link *lnk) fsp->aio_requests[i] = fsp->aio_requests[fsp->num_aio_requests]; if (fsp->num_aio_requests == 0) { - tevent_wait_done(fsp->deferred_close); TALLOC_FREE(fsp->aio_requests); } return 0; diff --git a/source3/smbd/files.c b/source3/smbd/files.c index a982c0a5980..a9e63192f61 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -578,9 +578,6 @@ files_struct *file_fsp(struct smb_request *req, uint16_t fid) } if (req->chain_fsp != NULL) { - if (req->chain_fsp->deferred_close) { - return NULL; - } if (req->chain_fsp->closing) { return NULL; } @@ -604,10 +601,6 @@ files_struct *file_fsp(struct smb_request *req, uint16_t fid) return NULL; } - if (fsp->deferred_close) { - return NULL; - } - if (fsp->closing) { return NULL; } @@ -655,10 +648,6 @@ struct files_struct *file_fsp_get(struct smbd_smb2_request *smb2req, return NULL; } - if (fsp->deferred_close) { - return NULL; - } - if (fsp->closing) { return NULL; } @@ -673,9 +662,6 @@ struct files_struct *file_fsp_smb2(struct smbd_smb2_request *smb2req, struct files_struct *fsp; if (smb2req->compat_chain_fsp != NULL) { - if (smb2req->compat_chain_fsp->deferred_close) { - return NULL; - } if (smb2req->compat_chain_fsp->closing) { return NULL; }