From c83ecbb51bddb1642eb4ee10c24f6b721af66c45 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 12 Nov 2015 13:07:21 -0800 Subject: s3: smbd: Remove checks causing fallback to sync on pread/pwrite/fsync. Rely on pthreadpool queueing instead of falling back. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke Reviewed-by: Christof Schmitt Reviewed-by: Michael Adam --- source3/smbd/smb2_flush.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/smbd/smb2_flush.c') diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c index d26707acc0c..00b05354a2e 100644 --- a/source3/smbd/smb2_flush.c +++ b/source3/smbd/smb2_flush.c @@ -162,20 +162,6 @@ static struct tevent_req *smbd_smb2_flush_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - if (get_outstanding_aio_calls() >= get_aio_pending_size()) { - /* No more allowed aio. Synchronous flush. */ - NTSTATUS status = sync_file(smbreq->conn, fsp, true); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(5,("sync_file for %s returned %s\n", - fsp_str_dbg(fsp), - nt_errstr(status))); - tevent_req_nterror(req, status); - return tevent_req_post(req, ev); - } - tevent_req_done(req); - return tevent_req_post(req, ev); - } - ret = flush_write_cache(fsp, SAMBA_SYNC_FLUSH); if (ret == -1) { tevent_req_nterror(req, map_nt_error_from_unix(errno)); -- cgit v1.2.1