s3: smbd: Remove all references to fsp->deferred_close.
authorJeremy Allison <jra@samba.org>
Wed, 18 Mar 2020 23:01:18 +0000 (16:01 -0700)
committerRalph Boehme <slow@samba.org>
Mon, 23 Mar 2020 09:40:45 +0000 (09:40 +0000)
We are now free to remove it from struct files_struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/offload_token.c
source3/smbd/aio.c
source3/smbd/files.c

index 03bb3309f38d1cd540dad2ab526da949fbc9b1a8..c562f1bab0bec02154e066030cce9e77a9aa3aef 100644 (file)
@@ -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;
index cf35f3297ec3344504d3abcb7916bd83ea1046a5..30a8c0eb04f98c1de9fbc43877eeefbc5f905fea 100644 (file)
@@ -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;
index a982c0a598063897c076481d7dd5b59b4afe46a3..a9e63192f61cf74baf0505b2f163ce2e81bf7765 100644 (file)
@@ -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;
                }