From patchwork Mon May 22 20:57:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13251116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B36CC77B73 for ; Mon, 22 May 2023 20:58:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8BFE86B0075; Mon, 22 May 2023 16:58:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 86E456B0078; Mon, 22 May 2023 16:58:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 738E36B007B; Mon, 22 May 2023 16:58:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 624426B0075 for ; Mon, 22 May 2023 16:58:00 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2A7C6C045D for ; Mon, 22 May 2023 20:58:00 +0000 (UTC) X-FDA: 80819103120.13.B994CC5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf29.hostedemail.com (Postfix) with ESMTP id 732BA12000C for ; Mon, 22 May 2023 20:57:58 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tv59qOQG; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684789078; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oZIY9GTPXEPoSMZhe+ryqBhZXmHTyjPJq3hYdlaANCY=; b=e45che8iNX/Gu9I8uRLCKzX3BvE5B7TDofu1TAEoz9NQLTE1FxwNCvePE287p6leVphmcZ J4Nk6fpEYbuCVmmXuHPYsA1K97prNtHHnnZboaOdquym9O/ibh3oVjacK5M+CBYQVPtEOs TwPfGE+Hcw/o/vXccvD/RX0KepM8+Zs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Tv59qOQG; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf29.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684789078; a=rsa-sha256; cv=none; b=5Hsqk0bqKup+QmRt98KlvZvNHZ5jTTbDqdMYMbl3feO9NE9Zky8xuN39uE8JEHKILlMJo3 FBdM7aBRKFO7a/Xxr4oJQVC+F/fg6dliFX8xlYR3t0MolqB4o8uNT7pPVGwATrHWXFe3hH GxK3DwuGJarqyqENCv3voypxQPU8ZkU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684789077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oZIY9GTPXEPoSMZhe+ryqBhZXmHTyjPJq3hYdlaANCY=; b=Tv59qOQGJIDgUZMTyFz/1O4sMupQuCl6IcihYBouiTODv9NndTFMgqDF1jrqrmLok9v2Op LrlhhFtcyh8cxB/ohh9gJ2pX6Cul6JsmGbMaK8jzzZrs+ByiMrQExiNszBQVw7+44jaOQf uKK6RqI7oVSgrYSO+fY0kv4V7VU9B6Q= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-580-uxNl4WjbMQmkgPs6MbWOuQ-1; Mon, 22 May 2023 16:57:53 -0400 X-MC-Unique: uxNl4WjbMQmkgPs6MbWOuQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3732F28EC104; Mon, 22 May 2023 20:57:52 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B2D02166B25; Mon, 22 May 2023 20:57:49 +0000 (UTC) From: David Howells To: Jens Axboe , Al Viro , Christoph Hellwig Cc: David Howells , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard , Dave Chinner , Christoph Hellwig Subject: [PATCH v21 1/6] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Mon, 22 May 2023 21:57:39 +0100 Message-Id: <20230522205744.2825689-2-dhowells@redhat.com> In-Reply-To: <20230522205744.2825689-1-dhowells@redhat.com> References: <20230522205744.2825689-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspamd-Queue-Id: 732BA12000C X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ttkk4jis3qodiw47n5mwyoshtmom6g7u X-HE-Tag: 1684789078-986838 X-HE-Me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DDnGzN9VbGNxASfZ/dLQUh/cAy6cCNQAjYULHMw0o3M6MZlwsOywbC1hOLM1qOP920p23x0TgCNzBbA6zr2s/S6Dg21GGRvOgw2fVTueEE1QHcNYVWOLLHow4y0nCo6+jmLGLuX8xdaVHn5N5+QaQn1wksYQs9PvYGsg/VgGCmZ59C1ciKsQMLbm91Zwze9f0+sl3DKTtnIPgCSOKhD/1w4acGNRBQYy3QMqCeD7fVzsLm74U9nwj0ac8zQHXbLYZREXYOWWZHjWeAcj2qCJWje5mMrRHMR X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: ZERO_PAGE can't go away, no need to hold an extra reference. Signed-off-by: David Howells Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig cc: Al Viro cc: linux-fsdevel@vger.kernel.org Reviewed-by: Jan Kara Reviewed-by: Christian Brauner --- fs/iomap/direct-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index 019cc87d0fb3..66a9f10e3207 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -203,7 +203,7 @@ static void iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio, bio->bi_private = dio; bio->bi_end_io = iomap_dio_bio_end_io; - get_page(page); + bio_set_flag(bio, BIO_NO_PAGE_REF); __bio_add_page(bio, page, len, 0); iomap_dio_submit_bio(iter, dio, bio, pos); }