s3: smbd: In async SMB1 reply_close() set fsp->closing = true, as we already do in...
authorJeremy Allison <jra@samba.org>
Thu, 12 Mar 2020 00:25:59 +0000 (17:25 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 18 Mar 2020 18:03:28 +0000 (18:03 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301

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

index aef34d9ede8dc78b52d1d9d9af1bb00542be72b8..55c773460505d2d47d92b9a03738932679586fcc 100644 (file)
@@ -5672,6 +5672,13 @@ void reply_close(struct smb_request *req)
                DEBUG(10, ("closing with aio %u requests pending\n",
                           fsp->num_aio_requests));
 
+               /*
+                * Flag the file as close in progress.
+                * This will prevent any more IO being
+                * done on it.
+                */
+               fsp->closing = true;
+
                /*
                 * We depend on the aio_extra destructor to take care of this
                 * close request once fsp->num_aio_request drops to 0.