From patchwork Wed Mar 8 16:52:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13166166 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 D148DC678D5 for ; Wed, 8 Mar 2023 16:53:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72991280004; Wed, 8 Mar 2023 11:53:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68D296B0083; Wed, 8 Mar 2023 11:53:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 468D8280004; Wed, 8 Mar 2023 11:53:33 -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 2BA496B0082 for ; Wed, 8 Mar 2023 11:53:33 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 02D0A140F5F for ; Wed, 8 Mar 2023 16:53:32 +0000 (UTC) X-FDA: 80546327106.28.0CBCE14 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf01.hostedemail.com (Postfix) with ESMTP id 4965B4000B for ; Wed, 8 Mar 2023 16:53:31 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cLrJwID4; spf=pass (imf01.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.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=1678294411; 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=I6ZrlRsRsDofmQn3lEmfgyWqn9TueQiK3X1MAm/v+IcjUZCcHvWOLaV+IakiqqeRlpyLVU 7XhiR9fDnCP3Tki7qo+oUukdnbX1ttI8rUIhLG8Kiez8yMV7yc/OopE0WbaIGrmuNqmeFJ x8IbYQKlqEoMCsuogpFVicV/eJaAaxA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=cLrJwID4; spf=pass (imf01.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.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=1678294411; a=rsa-sha256; cv=none; b=FqdC3JhRd4oQk3JeJqx7B6p2tlbPewTls1mF1ekS1Mrbf0uts435qW4ejmcVpTnV30pruE pDqZJm00BzY0k+vbZ3g87JfyeMz/lkZg7gep+lSCFU2YQYfclZ1kExc8tS7FmS7Qvi8cm8 RXQTQULktXMys3EtwZBi3U04tdrP1og= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678294410; 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=cLrJwID4AaeIrVCox/vxPc6W3AcgZRX8MkJsdRd8McPz/steGxrlZWSik87TnABMyKk4O3 OVIMp9Tybfk20YNYxxxCN/ycgLYCyZ0mlw8cTWnlC+1X1MONX4h0of+qTCDGhlW3veg/3K 2A6nlZc5DwBACUz1gPWXrmdHebRZxFY= 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-279-GmxZAvM4NvKOIUhelF-1kA-1; Wed, 08 Mar 2023 11:53:25 -0500 X-MC-Unique: GmxZAvM4NvKOIUhelF-1kA-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 71C0287B2A3; Wed, 8 Mar 2023 16:53:24 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 858592166B2A; Wed, 8 Mar 2023 16:53:22 +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 v17 09/14] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Wed, 8 Mar 2023 16:52:46 +0000 Message-Id: <20230308165251.2078898-10-dhowells@redhat.com> In-Reply-To: <20230308165251.2078898-1-dhowells@redhat.com> References: <20230308165251.2078898-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspamd-Queue-Id: 4965B4000B X-Stat-Signature: sffdqp6iq9a9w9ycwf11r8jczshfe5rp X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1678294411-270839 X-HE-Meta: U2FsdGVkX19ioT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i6ewR6mlayEJDt/SIHF9knlaqaPVJk9bMqufIWgLxhJ7pQbH2YyhPTqbbtlV5hv9frYueIffzLDB7NA/mtJgYpTm6JcQsHVxHIm/h/CHi16geLWdm82YOdRHPbpxvCYXCd990Ma9O3yHZUe/icgH4s8e73j/fsRRKQwkbocUxUzSXZvn4sefp6yK30jhMCY77qGqXYJqWdi8XyAuvvHfCCeZh085kjdQxyTmxDN1Iw5KM7uM3YWysHb/hTs0rCX8YpMlyDHeycMObeENiOND7ercT9mxya 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 Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig --- 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); }