diff options
author | Jeremy Allison <jra@samba.org> | 2012-04-12 15:04:42 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-04-12 15:06:59 -0700 |
commit | d399af30c183663f487bf4d086ec4377f84725b0 (patch) | |
tree | 1daed0cc457c641a60a1d8b20baf32e563e56907 /source3/smbd/close.c | |
parent | fd3848636498fa357ff0085a126e374a3e91d14b (diff) | |
download | samba-d399af30c183663f487bf4d086ec4377f84725b0.tar.gz samba-d399af30c183663f487bf4d086ec4377f84725b0.tar.bz2 samba-d399af30c183663f487bf4d086ec4377f84725b0.zip |
Remove cancel_aio_by_fsp(). It can never work and could lead to memory corruption
as outstanding IO's complete. Also we never have any aio's on a call to close_normal_file()
with close_type ERROR_CLOSE.
Diffstat (limited to 'source3/smbd/close.c')
-rw-r--r-- | source3/smbd/close.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c index dc6df47ee6..c87b1a000b 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -667,19 +667,16 @@ 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 (close_type == ERROR_CLOSE) { - cancel_aio_by_fsp(fsp); - } else { - /* - * If we're finishing async io on a close we can get a write - * error here, we must remember this. - */ - int ret = wait_for_aio_completion(fsp); - if (ret) { - status = ntstatus_keeperror( - status, map_nt_error_from_unix(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)); } /* |