Received: by 10.223.148.5 with SMTP id 5csp6283154wrq; Wed, 17 Jan 2018 11:43:07 -0800 (PST) X-Google-Smtp-Source: ACJfBotIcoKbeoWVyeSM/kqKtrMITBukWVj6kNrqAOvjMM5LAR3YG3LwTVjehc/Qz8g+2rqifcr3 X-Received: by 10.98.60.67 with SMTP id j64mr32351411pfa.217.1516218187388; Wed, 17 Jan 2018 11:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516218187; cv=none; d=google.com; s=arc-20160816; b=PV3eW5NTmu5XMqQ6Lu3aBW4V4cxB/xf+PiFBU3wwrPcnqIMw9zNqvc9B2Hg85m4yfq X6maJIBN9Eky0MTVDJgFIv9u+OyRfBg2Fn/Wc1eVrJfQQWEAI83ZyP4f7ZveGggU8pyY Dm/mTfl9hIcd8VlJOfAyRzvfJngY/UZgt5tUZrS32PrtztQ8zajwYM737fnmFJDzI77+ wY4GgYAj/GQIpSk8qCuvv1rUc7pEGeuk9EZYJNoW71SKXo2lohJUbX/drANMmGDxpzn2 EcmyIcY/evpcFS40OaNEtOAXrylcOr3PkZtS5WX6rn4J9TbgLkGeLUavDcM8KGupmfH/ gcpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ig0gfteTn3tUvM4umvmsusqczizciWpm75Ay0ejZzQY=; b=l07hvznSQBWCEXp2X9E42HIh6K3CYvW4kR978BjvNHeJsHRFVsbNN53SCupHvzDaSu u6Yw4Qo80+ikf/dlnaXv0vsWlTv3eL3JxqL4gMK8NnVzqPKqhwHhKScVBmND2vt1iOkV wWGoG5OeUGWLMy/3rhQ8OsES8/dI1QKwG54Es9MY6BS+7uk26SgBiq72g9QGRLdSVntv WJqu3LM8pGf665t1ZHo92kusRisBn6SO8NeNf874SB2wWs41/dWRNSs/l5iW7iqURHBV Pjtbwu1VE/x6FPibwu5m1OiMsfXTMaIEcVfUmmIsP1hG9Fl+CBmtbhwqpxDai7PT3eg7 aVWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SE54HLq+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si4395443pgn.484.2018.01.17.11.42.53; Wed, 17 Jan 2018 11:43:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SE54HLq+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753701AbeAQTlu (ORCPT + 99 others); Wed, 17 Jan 2018 14:41:50 -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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ig0gfteTn3tUvM4umvmsusqczizciWpm75Ay0ejZzQY=; b=SE54HLq+yh/NdNFXNGThNWOjB FMUzaIOWqdU80JayMjMo+Pj6eRfeRcH1zC3Olkqzh3NQKZ/KzjwqIg6sfCJ2518MZp79BIfFEBh2t KCdxo7X2eZBdPc2+7FF/dEDXJpghjVGoXhpOlov4eRkN0s829j0ssKgy7BoJuFgyFIk5Tk+Yx4mxs 1kvTxO8a1u8SQewGmOuOZzRSP2AL+w3f199zPWmYdO2PTLSaSJa6ZpkOEqgMr/ntzkLfy9G3pAB+q cORori9rzYJuSZNpolA7wgfKAg+129dEujhG6TEEVNKULH4ShmlegCaH04f25xO17ZsBA4px4qc9K 1/X/Fd/Mw==; Received: from 77.117.185.35.wireless.dyn.drei.com ([77.117.185.35] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ebtNI-0002xZ-38; Wed, 17 Jan 2018 19:27:52 +0000 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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