From: Jeremy Allison Date: Thu, 12 Mar 2020 00:25:59 +0000 (-0700) Subject: s3: smbd: In async SMB1 reply_close() set fsp->closing = true, as we already do in... X-Git-Tag: ldb-2.2.0~1440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7d09b30ad14d51bbcbe368a11348754121f6ff8;p=thirdparty%2Fsamba.git s3: smbd: In async SMB1 reply_close() set fsp->closing = true, as we already do in SMB2 async close. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index aef34d9ede8..55c77346050 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -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.