From patchwork Wed Jan 25 21:06:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13116172 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 2D762C54E94 for ; Wed, 25 Jan 2023 21:07:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ABAA86B0078; Wed, 25 Jan 2023 16:07:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A43836B007B; Wed, 25 Jan 2023 16:07:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 90B446B007D; Wed, 25 Jan 2023 16:07:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 80E466B0078 for ; Wed, 25 Jan 2023 16:07:18 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 68576140D91 for ; Wed, 25 Jan 2023 21:07:18 +0000 (UTC) X-FDA: 80394556956.19.37A033A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf09.hostedemail.com (Postfix) with ESMTP id A4B28140015 for ; Wed, 25 Jan 2023 21:07:16 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cMSKG0h9; spf=pass (imf09.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674680836; 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=AA3SDxqAw6tV+jeEhwhhXCCPQx7iw6NiGu/cAPT0aQk=; b=2wg1A2Twpa2QFZOlKYbzKTdMhdEUOwzGJZJM83PXoeWE3ZxhWpm+tlE5KWwMK/HdcH/xAt AGjVC/VjoVD4LXaOv6FsVEVnvZQlCaGhyBOJ0Q5f0ikyjdhUygye1cfQb59X9H9ZigqTNR PnAz5zlbSIjfuYtDHdduRUyeidKUgqE= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cMSKG0h9; spf=pass (imf09.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674680836; a=rsa-sha256; cv=none; b=Z9ROwAFO42h7s+LM+xYh7ExfHzaLTYf7DRJsbYxXCXnzTmQH6NwYAFU9rRw0/ZSWFUkhR9 JKA9+lUC0RzuwDql+nhvUJdjdT/IHnNJHaDnhRwemJUKqGPC0oQnllagqdK/q0Q0RnaQj4 gir+STPHiu5VNQUEaLfZ3eKs4cy8aUY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674680835; 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=AA3SDxqAw6tV+jeEhwhhXCCPQx7iw6NiGu/cAPT0aQk=; b=cMSKG0h9z3G3eDAxpAVzMWGmIW4MkKSVoc8vwjwEaWSfCJxzx5qS1jBabQlGSAtNaddpiN IXUveQPgToZeb94S3pFh7G//hDHil6dfITyu3LEzrB2GJXSFytPzVHZFyQpmNWqRyesZbt YtuAlxm7EWOM80RX+y1RAgJDCoNVFNQ= 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-62-bzFi5apAOA-xyIVD8HJxAA-1; Wed, 25 Jan 2023 16:07:12 -0500 X-MC-Unique: bzFi5apAOA-xyIVD8HJxAA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9333B1871CDB; Wed, 25 Jan 2023 21:07:11 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.33.36.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id A052C42203; Wed, 25 Jan 2023 21:07:09 +0000 (UTC) From: David Howells To: Al Viro , Christoph Hellwig Cc: David Howells , Matthew Wilcox , Jens Axboe , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard Subject: [PATCH v10 3/8] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Wed, 25 Jan 2023 21:06:52 +0000 Message-Id: <20230125210657.2335748-4-dhowells@redhat.com> In-Reply-To: <20230125210657.2335748-1-dhowells@redhat.com> References: <20230125210657.2335748-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A4B28140015 X-Stat-Signature: 8e71fk7dg86yi58ak4uzfrewzpf7b44p X-Rspam-User: X-HE-Tag: 1674680836-846829 X-HE-Meta: U2FsdGVkX1/Sta9l6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/+LP2vo+H4RLbL0Irkk50fHCjIr3csdPaS7HHWBGZ0J9OR/SlZFWRchM9/7JK7Zp9mUrppjimgsXs7yIHxOVLh0Q+tKGt20qt7qmWJXq/D3CaGubTIavtBAXxf5DNpasWMynOiaY/ojtlpVRx/bvtdYtV2Ap1vw/ryFVB3sR5bqJ9e0v8WeZFOvhkoMWv8gbVjNV/C6636JUfjhVoeIuys4DTlTKs1X5XgJ39KlmsX9vfb06ie+TPEXOAKdf9S9pnboFmbfnv/Ty3 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 9804714b1751..47db4ead1e74 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); }