From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D967C77B75 for ; Tue, 23 May 2023 08:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235281AbjEWIIa (ORCPT ); Tue, 23 May 2023 04:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235998AbjEWIID (ORCPT ); Tue, 23 May 2023 04:08:03 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE79610DD; Tue, 23 May 2023 01:07:37 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B6C852041A; Tue, 23 May 2023 08:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1684829222; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sO7kzFwmptuNxnDGut8ORslGVd/fsxgDQH0NmJ023YI=; b=r1KUvnNOrg4jCn2j2nvm3IGqQZdkSp91G7kLEGLkmgGJxcV8LFfdWxsw3jH1pqVU0QACXc sg/cbM6M6BTU0IyAfyUvgrVCJvEYSkQ9JsPC5/+DWNStD9q/zy8r5eIfeQCFYeGmvV+g2F uYa+9vaGVp8XTheLDDOw7szQBHtG8yk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1684829222; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sO7kzFwmptuNxnDGut8ORslGVd/fsxgDQH0NmJ023YI=; b=Aev85FbgF9zoffR/wHco7E5dzx62A6HSGGXEjWrm9VODge+o7OMOQ5BCtrVNDzXW1XNCcY OdpS27+W46HrysDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9ADE113A10; Tue, 23 May 2023 08:07:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pZfHJSZ0bGQgMQAAMHmgww (envelope-from ); Tue, 23 May 2023 08:07:02 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 16D74A075D; Tue, 23 May 2023 10:07:02 +0200 (CEST) Date: Tue, 23 May 2023 10:07:02 +0200 From: Jan Kara To: David Howells Cc: Jens Axboe , Al Viro , Christoph Hellwig , 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: Re: [PATCH v21 1/6] iomap: Don't get an reference on ZERO_PAGE for direct I/O block zeroing Message-ID: <20230523080702.vo5n3vanhc5kxcen@quack3> References: <20230522205744.2825689-1-dhowells@redhat.com> <20230522205744.2825689-2-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522205744.2825689-2-dhowells@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon 22-05-23 21:57:39, David Howells wrote: > 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 Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > 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); > } > -- Jan Kara SUSE Labs, CR