diff options
author | Jeremy Allison <jra@samba.org> | 2020-03-10 10:55:22 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-03-18 18:03:28 +0000 |
commit | 0c952bba1edf7c8173d05ccdc6fdaa7232d2c6aa (patch) | |
tree | 43c17b41a46d44eadf0b0a329f46f23f48d09e4f /source3/smbd/aio.c | |
parent | 566658d914176c41942e3c6aba404ae369aeb123 (diff) | |
download | samba-0c952bba1edf7c8173d05ccdc6fdaa7232d2c6aa.tar.gz |
s3: smbd: In aio_del_req_from_fsp() talloc_free(fsp->aio_requests[]) when fsp->num_aio_requests reaches zero.
The add code in aio_add_req_to_fsp() re-tallocs
this array on demand, and talloc freeing it here
allows it to be used as the parent for a tevent
wait queue, so callers can get notified when
all outstanding aio on an fsp is finished.
We'll deal with any performance issues in
the next commit.
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>
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 0f824f5aa1f..afe76608cd3 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -103,6 +103,7 @@ static int aio_del_req_from_fsp(struct aio_req_fsp_link *lnk) if (fsp->num_aio_requests == 0) { tevent_wait_done(fsp->deferred_close); + TALLOC_FREE(fsp->aio_requests); } return 0; } |