From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Cyrus-Session-Id: sloti22d1t05-239000-1516218131-2-17846565444822745958 X-Sieve: CMU Sieve 3.0 X-Spam-known-sender: no X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HEADER_FROM_DIFFERENT_DOMAINS 0.25, RCVD_IN_DNSWL_HI -5, T_RP_MATCHES_RCVD -0.01, LANGUAGES en, BAYES_USED global, SA_VERSION 3.4.0 X-Spam-source: IP='209.132.180.67', Host='vger.kernel.org', Country='US', FromHeader='de', MailFrom='org' X-Spam-charsets: X-Resolved-to: greg@kroah.com X-Delivered-to: greg@kroah.com X-Mail-from: linux-api-owner@vger.kernel.org ARC-Seal: i=1; a=rsa-sha256; cv=none; d=messagingengine.com; s=arctest; t=1516218130; b=tz1AzsAQpJsfYYA749Os1d0B/ujWGXxW6HycAh0MplLOSpo EEOmme7p8/QpIBBAsmtR9QAmdKg3fJGN2A1LSdzsZ3PGh+5Q6F7h+SdfsoYqK+ux BW7YUbmbR5vn7Emsc9wKCm2g3uHUepv+I/85b/TqHa+VIl7+rTLx/SA4V2cg6bzy fP7RiqQEB78uCDvBWq9LfjcFB0bDxfz1G4eke7INIAUHAphO7AITdtmpV9UGPcBO IxYcB9WPsUkBls/in71B6E+AVyCdvb/oZxbgCufsP6qLiM9is7Qk55wXrDGa/seU DXQ5mv6hCk5GtT3yiO9BqjdaDLlUl4QL9NYL74A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:sender:list-id; s=arctest; t=1516218130; bh=eM7jVMi6x0jRAufoec6WixJcgcUj0IfOysCvCBgcaO8=; b=tzjeguQYCzmo ITseBD4MNRSbKFSXU3/R6rrZv8Q8kl9VpxekSwZfG81FHHbescR/hgQYaRZvaA4X 2OC+g0I6RVIxrtAA0XXI0hLUCycb2oHvO8AbYwRw38DxQlMbk9XVOC1WG5hM0Ng/ 0WDYzWAKWinmfzBcjFQJJZQe74IG+VpbBxVb/08CafIwAT7778tqVXRTO5UnqAM7 F39qIhp2xCUnez/Bx+OOPLvQEJCPkLXsbituUNik2fmXFRhP+ayDNS5M8fxI5w9c QxUulaans0J84hPz56NbIik2v0x5RRdWgUJPewcCph7Xbofng6j7hbUGV1zTTDSH hLwRa1qfqQ== ARC-Authentication-Results: i=1; mx1.messagingengine.com; arc=none (no signatures found); dkim=fail (message has been altered; 2048-bit rsa key sha256) header.d=infradead.org header.i=@infradead.org header.b=SE54HLq+ x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=bombadil.20170209; dmarc=none (p=none,has-list-id=yes,d=none) header.from=lst.de; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-api-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=lst.de header.result=pass header_is_org_domain=yes Authentication-Results: mx1.messagingengine.com; arc=none (no signatures found); dkim=fail (message has been altered; 2048-bit rsa key sha256) header.d=infradead.org header.i=@infradead.org header.b=SE54HLq+ x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=bombadil.20170209; dmarc=none (p=none,has-list-id=yes,d=none) header.from=lst.de; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-api-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=lst.de header.result=pass header_is_org_domain=yes Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753647AbeAQTlt (ORCPT ); Wed, 17 Jan 2018 14:41:49 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:35789 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbeAQT1y (ORCPT ); Wed, 17 Jan 2018 14:27:54 -0500 From: Christoph Hellwig To: viro@zeniv.linux.org.uk Cc: Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/36] aio: remove an outdated comment in aio_complete Date: Wed, 17 Jan 2018 20:27:08 +0100 Message-Id: <20180117192742.710-3-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180117192742.710-1-hch@lst.de> References: <20180117192742.710-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-api-owner@vger.kernel.org X-Mailing-List: linux-api@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-Mailing-List: linux-kernel@vger.kernel.org List-ID: These days we don't treat sync iocbs special in the aio completion code as they never use it. Remove the old comment, and move the BUG_ON for a sync iocb to the top of the function. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 03d59593912d..41fc8ce6bc7f 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1088,6 +1088,8 @@ static void aio_complete(struct kiocb *kiocb, long res, long res2) unsigned tail, pos, head; unsigned long flags; + BUG_ON(is_sync_kiocb(kiocb)); + if (kiocb->ki_flags & IOCB_WRITE) { struct file *file = kiocb->ki_filp; @@ -1100,15 +1102,6 @@ static void aio_complete(struct kiocb *kiocb, long res, long res2) file_end_write(file); } - /* - * Special case handling for sync iocbs: - * - events go directly into the iocb for fast handling - * - the sync task with the iocb in its stack holds the single iocb - * ref, no other paths have a way to get another ref - * - the sync task helpfully left a reference to itself in the iocb - */ - BUG_ON(is_sync_kiocb(kiocb)); - if (iocb->ki_list.next) { unsigned long flags; -- 2.14.2