diff options
author | Volker Lendecke <vl@samba.org> | 2012-07-17 22:43:06 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-07-19 03:40:17 +0200 |
commit | 8ef968a23dffb2e1c1518f7489d4ab0b14a71118 (patch) | |
tree | 9e9cd5237df264028fb1752ffd82a5e1ea358c62 /source3/smbd/aio.c | |
parent | a6b58367410abc85fc079910f3f193eaa386f9f1 (diff) | |
download | samba-8ef968a23dffb2e1c1518f7489d4ab0b14a71118.tar.gz |
s3-aio: Panic if we try to close a fsp with outstanding aio requests
The core smbd must have taken care of this. If we don't do this properly,
we have a race of the close(2) against a pwrite(2). We might end up
writing to the wrong file.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 19 03:40:17 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 9f7390bba37..3b128797984 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -973,19 +973,3 @@ static void aio_pwrite_smb2_done(struct tevent_req *req) } tevent_req_done(subreq); } - -/**************************************************************************** - Handle any aio completion inline. -*****************************************************************************/ - -void aio_fsp_close(files_struct *fsp) -{ - unsigned i; - - for (i=0; i<fsp->num_aio_requests; i++) { - struct tevent_req *req = fsp->aio_requests[i]; - struct aio_extra *aio_ex = tevent_req_callback_data( - req, struct aio_extra); - aio_ex->fsp = NULL; - } -} |