From patchwork Wed Mar 8 14:37:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13165957 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 977F2C64EC4 for ; Wed, 8 Mar 2023 14:38:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 34BA36B0081; Wed, 8 Mar 2023 09:38:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FADC6B0082; Wed, 8 Mar 2023 09:38:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19C316B0083; Wed, 8 Mar 2023 09:38:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0A7CF6B0081 for ; Wed, 8 Mar 2023 09:38:32 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C1525807A3 for ; Wed, 8 Mar 2023 14:38:31 +0000 (UTC) X-FDA: 80545986822.05.0DF93D7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 2B8D7C001C for ; Wed, 8 Mar 2023 14:38:29 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LeDegEF9; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf28.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.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=1678286310; 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=T0MgyEE2up5lyn6F4xZiFP7ZLu50ZEhkrR3VW4b8xrI=; b=e+wfF8mi5FdxA3U462rZdc/am3E+UrCqYkKKAxeEcngvSLaMQOaUS4CEmV2MNRff3YdvDs 2nOkjGyci5+BMrW73Ha/wKLToMQk+aaUf8XZrNkB76lwrR/A1JHxEIDW8O70A7o/X5IZCG EI4neaJmH7xp+otE6YjPicmHL9LmIF4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LeDegEF9; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf28.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678286310; a=rsa-sha256; cv=none; b=kc1tU8V2dKdyR4UqLHGAfnREGwKIfUCVA97XxCnV6xrpepNWHwHfyKmqXp0my/63E/hpS/ kb3h0V34xdJxgrv7ac2zL47n5s84jPhdlYwRu0XYh9Japc+9ywjAqHE/dJnh7LlTWIQDdF oviLXXc0mQSDnKZUZa1DskGHu1hfEP4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678286309; 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=T0MgyEE2up5lyn6F4xZiFP7ZLu50ZEhkrR3VW4b8xrI=; b=LeDegEF9xunR33G/QWvOa7Pz/eG2tKtiOTJJBMDn9Z4d4CmjCAJN+kssE8Ciyhot7L0nBL QxE0NKqSzFIvYYDXmeEE5muBxwZKrlwQ6XuXkrH6BGxUYeyLLt5dvhOdkCCFCYcbdH3MkT ekliw7V1IbHCmNa9Ucfm8M5Z9bRWAQc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-LwKNUDAjOYOokcFxinhM6A-1; Wed, 08 Mar 2023 09:38:26 -0500 X-MC-Unique: LwKNUDAjOYOokcFxinhM6A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5AD9F101A55E; Wed, 8 Mar 2023 14:38:22 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71FC01121314; Wed, 8 Mar 2023 14:38:20 +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 , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard Subject: [PATCH v16 08/13] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Wed, 8 Mar 2023 14:37:49 +0000 Message-Id: <20230308143754.1976726-9-dhowells@redhat.com> In-Reply-To: <20230308143754.1976726-1-dhowells@redhat.com> References: <20230308143754.1976726-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Rspamd-Queue-Id: 2B8D7C001C X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: bwcg97bz3w4spjcp5tdpaw9n5qebrbto X-HE-Tag: 1678286309-589625 X-HE-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7J4KjtPfueav4wugbwPfuXDPM6hqcb3ZZu2swcN71nfSimK0oBx4s6cUNpmQX6PDI7oC675hArbkIFOaO7DztN9oI4LgnYRbK8+umHPj0CHLV8K7AQFbbeqqArFHG0kpRx0fnnZdqF2OCRIP8nU2LedsPyOUIOQt8vMtdZGlBhjQXuytpvUddb6Bm2oeFNZXs0nr+8IMmnUMVJOo/c6YupArG0aFsT1Nd3VqCd8cd65zGmxpcAUjczMx7xQvJkTEyf+lo1eWYcTfOSOeZ3kEIf+JG73CwD7v+ 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 cc: Al Viro cc: David Hildenbrand cc: linux-fsdevel@vger.kernel.org --- 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 f771001574d0..850fb9870c2f 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -202,7 +202,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); }