s3: Properly handle shutdown with the _send/_recv based aio
[amitay/samba.git] / source3 / smbd / close.c
index 8633f82c0a6cec6bb0321e04e78bf745d7d19349..720ffa7b649d5089b18c6784a1e50f2faa2874cd 100644 (file)
@@ -706,17 +706,8 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
        NTSTATUS status = NT_STATUS_OK;
        NTSTATUS tmp;
        connection_struct *conn = fsp->conn;
-       int ret;
 
-       /*
-        * If we're finishing async io on a close we can get a write
-        * error here, we must remember this.
-        */
-       ret = wait_for_aio_completion(fsp);
-       if (ret) {
-               status = ntstatus_keeperror(
-                       status, map_nt_error_from_unix(ret));
-       }
+       aio_fsp_close(fsp);
 
        /*
         * If we're flushing on a close we can get a write