From patchwork Fri May 19 07:40:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13247782 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 D164DC77B7F for ; Fri, 19 May 2023 07:42:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F048280002; Fri, 19 May 2023 03:42:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A0AC280001; Fri, 19 May 2023 03:42:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5199F280002; Fri, 19 May 2023 03:42:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3EC03280001 for ; Fri, 19 May 2023 03:42:41 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1DD281C6FAE for ; Fri, 19 May 2023 07:42:41 +0000 (UTC) X-FDA: 80806212522.21.0165F37 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 78641140012 for ; Fri, 19 May 2023 07:42:39 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NQG0AUXj; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf09.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=1684482159; 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=bVHRSn78bv2WLH1N/JcHu+lyUuHEuJocIR8qr67QTuPzCuny6PjBt5qoVKBkuIesyUpRWQ FmanADE+VQrExKKrcpZNyoGz3sujBs3ofu+ICYZ9cUgpgB7NiTNIxkwXxIN4Qv5ASHgFHh 5bvFItKvbEeK+ZcctKJ5FpcNExLfDMQ= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NQG0AUXj; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf09.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=1684482159; a=rsa-sha256; cv=none; b=Uysyrqqr1g+xhdT4/3tYf1LfqOEu0pweJ3KLYbaY3c20Bwlka4SUt7fonnH4dGsNqYEVVc X/bZyjnILqyGP1r5+AMdj3c0307+ZxxoQ2je9s6P+pyMq+EWgCGi+lUQmIpRT1dVKh8vcn bAuN4S0tBLLgheh/o4FdOIv/r5ZLnj4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684482158; 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=NQG0AUXjacrQIoHcSmZtkMjpL1A3xLx5PfM0aZuG8vflZzB8GW1hXtv10Poft2H8sOCigC NZNDFyi4zhQKwfPUeAY3Hthl1MfXsHOhUWyTOlx1Nz88w68w04p2cKAJ1tddoaNt2U0cXU b2wUPnWGFBz/31j4Kwua4w50I4ndw1o= 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-218-S_Amoo1cMROA4t9BdXJr9g-1; Fri, 19 May 2023 03:42:33 -0400 X-MC-Unique: S_Amoo1cMROA4t9BdXJr9g-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 8E12685A5AA; Fri, 19 May 2023 07:42:32 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id 503291121314; Fri, 19 May 2023 07:42:30 +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 v20 27/32] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Fri, 19 May 2023 08:40:42 +0100 Message-Id: <20230519074047.1739879-28-dhowells@redhat.com> In-Reply-To: <20230519074047.1739879-1-dhowells@redhat.com> References: <20230519074047.1739879-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Rspamd-Queue-Id: 78641140012 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ma749mrubfbgb6ucx1edq156i4m3rrab X-HE-Tag: 1684482159-721062 X-HE-Meta: U2Fsd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oMj7aDfui3ind9X3BNCke/atbFT1b3wftCz/TLtok3x9AeSkLDhCEbdBVEOuLc1CXAeV+l+iwTyGD3mw1hk7I6P7J1/rshXEHRmm9C1t30MnWWyFFdaAumCgtXgRzbxDDx6l1lgE5OZp0VAcGlkKuObGMQ1r1CHssr/T+8oXZa8AR2+QWBr/eKjXSEXtaJBYVa3G5f7dWFeVcuHReWkGty98nwpEbL1xzVJ1OQgdW78uUif8CGayPPV0ln2RRjcAWaPgaH0fAK0/+0Fb/g8QrIj439BgLlnC1Hf9 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 --- 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); }