From patchwork Tue Feb 14 17:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13140636 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 5D6F9C61DA4 for ; Tue, 14 Feb 2023 17:14:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F29266B0088; Tue, 14 Feb 2023 12:14:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB0C76B0089; Tue, 14 Feb 2023 12:14:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2B3D6B008A; Tue, 14 Feb 2023 12:14:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id BE41C6B0088 for ; Tue, 14 Feb 2023 12:14:27 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 67246AB66B for ; Tue, 14 Feb 2023 17:14:27 +0000 (UTC) X-FDA: 80466546174.05.87CCD80 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf23.hostedemail.com (Postfix) with ESMTP id 95381140015 for ; Tue, 14 Feb 2023 17:14:25 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BCSrFSm9; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.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=1676394865; 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=gsgCqmxRwJNDbM1rKLGcbOdo3wICfCQoKkk2cVl8iJj/PMsMuXEcvLJGy8cPos/xhEkNMI is82512/gU9s/Pk5+6CjUXMsEgQSDcxzkiXJ7hRNLu2t4g0IxpO84hZcnbp37WhOwVb1u9 /uSf3laes3z6bgqFDkO7OVpCzse0Gco= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=BCSrFSm9; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf23.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=1676394865; a=rsa-sha256; cv=none; b=AG8Hyu7Zdnq+THgY7xWa3JcQpcuUL1gMkw2v6GFCmDVYkhHcrORiaHN0m6OJhrM3xBYBxp T6g702bNGKB93Zoo+EnO4XkiazpfC1DYHVMbMXzFoafYjc3cpIAxn+5zLbzhg4ScmTIICS ychFrmaecExknVgRjRXiBLJQ7PmZ60U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676394864; 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=BCSrFSm9m4vCFf6Z47aB/J5gIS1hhLR9Jora5YI3jbQWFJxTF6Dk9i7xJS2VU7WmjNZILq HHtLpHmi6534FdaMK1rjGeqt2Yd+EDp+u5sbZehD45CDaUGyULi/wh6owDjNebyE37s8a4 WeQMySuKgnsoqnNVSu4XO97LQGV267A= 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-515-DQOy9zFmOZSICpQlPKxSDw-1; Tue, 14 Feb 2023 12:14:20 -0500 X-MC-Unique: DQOy9zFmOZSICpQlPKxSDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE7998027EB; Tue, 14 Feb 2023 17:14:18 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 179BC2026D4B; Tue, 14 Feb 2023 17:14:16 +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 , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Hubbard Subject: [PATCH v14 12/17] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Date: Tue, 14 Feb 2023 17:13:25 +0000 Message-Id: <20230214171330.2722188-13-dhowells@redhat.com> In-Reply-To: <20230214171330.2722188-1-dhowells@redhat.com> References: <20230214171330.2722188-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Rspamd-Queue-Id: 95381140015 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: dnj9u39x6kzf6m8ux6c4ydh8fbrcq51i X-HE-Tag: 1676394865-288265 X-HE-Meta: U2FsdGVkX1/yoU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PvXrYg2Z35BxAnd5avOO0p0NzDTsywK3r6/r89yqOgPL5F4w1OQwvmqamWV/zdot7nalJRtWiTq2H4VA/Djn+DfsSU6G8/BuWtrC7ZtH7zbuSfGhVr3wjLFDTcagW4gtb8E55FK9hVY5tWJ5KG0RtphV3JLqFXYsdEPN9wnirJ2MHUAEkrw9x9tuj/mQXd8wORtzB4N3MaJ3OrIenHejL6VJK+exqR0EXpZTsK3TgINdXV3Q12VvIxRF4t8lht2IQklAQShvouQBP0aMLhEPJsF20YwPI51bz 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); }