Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4566497rwl; Tue, 28 Mar 2023 08:28:52 -0700 (PDT) X-Google-Smtp-Source: AK7set+2pcph/aLdpuYqVsEMoOLu2OU3DwYCQtP41h47ak80URT2/mxUCindfsEc/Hr5PZTS6e4u X-Received: by 2002:a05:6a20:b930:b0:d9:1eb8:7828 with SMTP id fe48-20020a056a20b93000b000d91eb87828mr11716043pzb.14.1680017331995; Tue, 28 Mar 2023 08:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680017331; cv=none; d=google.com; s=arc-20160816; b=s0zxQpcglgmM3DZv/8ywiTJITaxYDPFN2Dzom2HCuOA6ZD+YyEkePifOiXjjUauYrG kMjrjxfuqb0wJ338Qk16CNiiB0knd6iSinWb0CP068ysAECJ9HTFwR8McJtH18+cMAWl fx55p8V6avMjwbdrvxDoltAUYH6+rojqCyeFLcM8O+u35tY1+iKem1pVXdLaIZPEPlUh osHx5Th9kWgsiflxFp7H8YBCWsXNCOm8hmYr1L8Lccc+gEJbq/NqG5qZ6F3ZsZkTFnSB y0FTjlyZfAeas/2ZLAcRhute1pAbEp4unJRcDOexq7tIyiw35JvEIqFd7F9E4Tm53fSs wlWw== 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; bh=wX0gmGH9IveBATxHqfl2f3+O0L57UTWE20X3bYSnO1g=; b=MnY6ng6ZrBiWOJMjrUcA5lJAZqqsenIkxJjp90N4skl6PnNRj+7JETJw2RgQECJZ3C m3ANxfCdi715ag2d2/z9/YQDMlUGKBmZRSShqDzl8u4feQhpRicIRVpUSleGFbywV7ms CXR8JXlFsuMOPebLlVfByPkX0KpizjnP9rMXO+ApI8a9OLLCihT1xJm3weVG2CP9WBY1 u18lksmqQIMBZ3fJT0GfvyIU6nE5HMjqr4P0T7N+Qhjur+fVdWCn2U3uHvXwfX3QV1L2 5yf4QcRlN8ggIYdLO3vC/pedttBJjOwSYiiCdsddsjSOxEYJQTOwMf1eGnkdLaRmD8cx JZ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=pr1joZer; 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 t18-20020a62d152000000b005a910ae9a76si29797912pfl.305.2023.03.28.08.28.39; Tue, 28 Mar 2023 08:28:51 -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=@infradead.org header.s=casper.20170209 header.b=pr1joZer; 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 S233924AbjC1PWE (ORCPT + 99 others); Tue, 28 Mar 2023 11:22:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233455AbjC1PVq (ORCPT ); Tue, 28 Mar 2023 11:21:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 268CE18F; Tue, 28 Mar 2023 08:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wX0gmGH9IveBATxHqfl2f3+O0L57UTWE20X3bYSnO1g=; b=pr1joZerHeKsBlyHogQ7a2PLlI OnKh0jl/7d0I5iiAMB3X7PawFs8SxWFO5NOBIiE/eGbmzg3mKFkP+FwRa5Ny5sshyl1sTJhGnrPxM i0MpOhosQtQBiby8hQFQO7A547F7BZHII2Gq3lLxvo2wHCUyCNlUkBH2lWpFKhivqkwK73X1FvCJ1 xLdu2PshCd8JBCdj8YknFzz0zElmgXh2/EyRWj8nrbt2FtuH5VKto89AE5WltWejQQIgwhOsB109K 5E0AzOvrQIsWkVletsJB/nREkTB9gE00L06B+oQy1+yUivc+7vioonZ2bMQDnHKEDOstKf2D+vqu9 lfiylSRA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1phB6P-008XAW-Sn; Tue, 28 Mar 2023 15:19:13 +0000 Date: Tue, 28 Mar 2023 16:19:13 +0100 From: Matthew Wilcox To: Pankaj Raghav Cc: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org, akpm@linux-foundation.org, hubcap@omnibond.com, viro@zeniv.linux.org.uk, senozhatsky@chromium.org, brauner@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, mcgrof@kernel.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org Subject: Re: [PATCH 1/5] zram: remove the call to page_endio in the bio end_io handler Message-ID: References: <20230328112716.50120-1-p.raghav@samsung.com> <20230328112716.50120-2-p.raghav@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230328112716.50120-2-p.raghav@samsung.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Mar 28, 2023 at 01:27:12PM +0200, Pankaj Raghav wrote: > -static void zram_page_end_io(struct bio *bio) > +static void zram_read_end_io(struct bio *bio) > { > - struct page *page = bio_first_page_all(bio); > - > - page_endio(page, op_is_write(bio_op(bio)), > - blk_status_to_errno(bio->bi_status)); > bio_put(bio); > } > > @@ -635,7 +631,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, > } > > if (!parent) > - bio->bi_end_io = zram_page_end_io; > + bio->bi_end_io = zram_read_end_io; Can we just do: if (!parent) bio->bi_end_io = bio_put; drivers/nvme/target/passthru.c does this, so it wouldn't be the first.