Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3995206rwd; Tue, 23 May 2023 01:16:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xfGNGZ/bumMZzP3kYYw0o95p8+8VYgtrjZTrrsby+zP4h7PEwPez/Wb9GDeYrn7ewZkz5 X-Received: by 2002:a05:6a00:189a:b0:647:e6d9:88c2 with SMTP id x26-20020a056a00189a00b00647e6d988c2mr18909815pfh.0.1684829804508; Tue, 23 May 2023 01:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684829804; cv=none; d=google.com; s=arc-20160816; b=d+Akt812Dc9r3cZ/cAW8ymfMyBRZIxV/PCsf9oQO5VnVTfGQnZ3039fuxVPVO65vx0 4ye8w8I9z/htsaD+SynvN47i0yndeMcSeQTn0gG63T7ieuS6VL+c4QzhH55sclS0bx6H O7yOTZcpQWvLIvEBq4tK4/JxhN0s2cD328dp2ad5XXlSBQBMKZbjO4TUTN0rs+rRBM6r KDRwYE3WiI3usAIw1U6HCCF6maTE+Z74bH62pPlNlAyJiSENXxYhg8CcxO/xo+we2i3N OiqNG37PA1YWrH0Dwy1KHV+yPkvaUTv4YpzNHejwULS+dAdI1+HaDxXBeS0iOBCTO8hR uBdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=sO7kzFwmptuNxnDGut8ORslGVd/fsxgDQH0NmJ023YI=; b=DbqJUGfFNeohii2BVnWSe+EZ82fCj5EdYqfkk6vbBpCMzwqgeuGuVuv+2kanNV2a2T Mf4hhePpDGRITkPhWMFkgPfmdiv2w4yUE2qbC/EulsYg6NLK/x/Lus+NWu+8QocB3HK7 DfbNMLWqxK4zn1VjFixvAPd+Ifes7zBJXkMvj/aOqFP7RUCe2rV98p9IxRy3Yz1jVrYN mkW3AXzS+Cqd5P8j+1Segaf7Va0u4xvguc39GeuvllWmU0CuFByqGpyYyGM8cNTjy35c 1wllekKVb/eXJoNUTX0VRsiCTKUbN/X+7eCvnEXLouJ97TXAXrDLEPcl4Ax/Fj9+/o8h Uidw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=r1KUvnNO; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Aev85Fbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020aa79575000000b0063f18073138si6242697pfq.99.2023.05.23.01.16.30; Tue, 23 May 2023 01:16:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=r1KUvnNO; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Aev85Fbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236091AbjEWIIi (ORCPT + 99 others); Tue, 23 May 2023 04:08:38 -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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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