Received: by 10.192.165.148 with SMTP id m20csp1106537imm; Wed, 2 May 2018 14:17:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqZqPrraDOpJQWLZ16NKYwpi8fNsYI+gX7xw9hk+6rD+cQAmgNHZCHBOE5y9gAFtYZS2+n5 X-Received: by 2002:a65:4844:: with SMTP id i4-v6mr17169427pgs.191.1525295845096; Wed, 02 May 2018 14:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525295845; cv=none; d=google.com; s=arc-20160816; b=ss0YSxvezIhGHI4vcJbEoJ76ikRptE+H0hH8OqTQ5qR7OY31UXYV6VwKNt3qX0W19X 8OVpnRKKaskryfbS5nGnoj4V0hKbDNCQXmg+JbEU5G6jaTbPFjHl1e2OOcNx5qjEbUpY y8ST9yKmPdEuoMKeT5k3cfxCURWeBJ9ScZKqG8mnzliFQijptaMtNnq5cKOLr2DTm5Su ZR1b9P1yGC2vFHo/rUUjE0RFUZ4wSetjlcfyzBUzuUzOPE8o+ZmQ/K+feTIDPl/N30B0 yf7pbhdY8mDQzoNDQ11Uih2WKf3o7nKdjeIyayf8NnzfoCRtauh76V29rzGG/8d0ipfN 4QTg== 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=gQfkydSAlo1N2NqlI2HNwEqfVtrY7oXm1yUB8tu4tO8=; b=XQwLGvLnBU13mKj619wvwRGCNiiZD4g4ow1WWew3duxStotL2bUmFKL7YhSPfytM/K 2rCsO0zQIswHhzLO7fgWqqeRaeUPxLf/042SgFxlHAc89jlrp8wnZpRCX+dInIg7blGU V+Lj3y/kCoEhuip1P/ATgSDi8XyRQYKjhzcK4ibQFBJZjgBAcPODjj/YPA+RLwRMjTv7 nKcFX8HTFNm+kIhe2qsUic3mBnnzYy960trEyEsmYA2mgxtp0v11d6axDBeBHxiohM6E A49ZxuYeT+AThgOcKN1R3UDUoqONqgBp7oTLSgBvlL6k2uROmkJFPO+WQIPKk/8EwQzo X7QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=H1AGFS5h; 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 s1-v6si10298499pgb.281.2018.05.02.14.17.11; Wed, 02 May 2018 14:17:25 -0700 (PDT) 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=H1AGFS5h; 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 S1751729AbeEBVPF (ORCPT + 99 others); Wed, 2 May 2018 17:15:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37834 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbeEBVPC (ORCPT ); Wed, 2 May 2018 17:15:02 -0400 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=gQfkydSAlo1N2NqlI2HNwEqfVtrY7oXm1yUB8tu4tO8=; b=H1AGFS5hg7U2mHCJxKPvWQLbQ tkragacsqAfILUPurnkSn9CeLdKU+yoaCZfA3KIKMV0vyF3tmetFGTo7OOn87PMUrr8fEs02YgTJy aRn2dtwh5Rp+4QN6npVDi0BOH0kln/I0FD6X9z6uLWxdpf00gOHQmGqpw9AsA3tJzOX2vjSx6QD44 YEpfRDh90qa39xp3BmeAQwT8oBVee4bAo9lNYwVwlZS6O8KRPh/oMavRej09uGGTbHiX7TTSCryJQ 2JdZAIfS7IpaJerkiwhCdckQdvJgdBz/9JfDg3kF5jpPqVvr1M5uCwuyo7AjTn91KucHflYmHZA7I PniJKGNAg==; Received: from 089144213252.atnat0022.highway.a1.net ([89.144.213.252] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDz5Y-0007Bu-CP; Wed, 02 May 2018 21:15:00 +0000 From: Christoph Hellwig To: viro@zeniv.linux.org.uk Cc: Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] aio: remove an outdated BUG_ON and comment in aio_complete Date: Wed, 2 May 2018 23:14:43 +0200 Message-Id: <20180502211448.18276-3-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180502211448.18276-1-hch@lst.de> References: <20180502211448.18276-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 BUG_ON given that the current definition of is_sync_kiocb makes it impossible to hit. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/aio.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index add46b06be86..7c1855afd723 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1107,15 +1107,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.17.0