From patchwork Thu Jan 28 07:11:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77C6FC433E6 for ; Thu, 28 Jan 2021 07:12:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 235EC64DCE for ; Thu, 28 Jan 2021 07:12:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 235EC64DCE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ACA2B6B0080; Thu, 28 Jan 2021 02:12:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A78006B0081; Thu, 28 Jan 2021 02:12:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 940E96B0082; Thu, 28 Jan 2021 02:12:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 7E9516B0080 for ; Thu, 28 Jan 2021 02:12:38 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4E0CE246A for ; Thu, 28 Jan 2021 07:12:38 +0000 (UTC) X-FDA: 77754315996.06.egg61_0d091912759d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 26BFA10049842 for ; Thu, 28 Jan 2021 07:12:38 +0000 (UTC) X-HE-Tag: egg61_0d091912759d X-Filterd-Recvd-Size: 5153 Received: from esa5.hgst.iphmx.com (esa5.hgst.iphmx.com [216.71.153.144]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 07:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1611817957; x=1643353957; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QAiSNZxQXn+fhhqJHg770cKqGnQ7j5esbXKR/QGBS14=; b=WVKWuS/embGLyj7oV4mMY0aKX8etbP1hi3TqcSaFxO9QMRwJOSIWEzZ1 aNtXdIyI0T5glOYX9f5qy2ZPGQHAOy0JyjDD1PJLfWzQeX8gKCvCi1qfT A6R7LcWP1fPYYfnxmIyTfq5SnSS12Xn44Egoz3WCJ1XtlfbCZTdLslDuf IEL+R1z7nSVF/A/epU3VaYg9xVoadbJEgO4MH21e5SY15JwS7nVUhJWX+ 4Rvrj1eA5X71tvQ2RqbcUhL+E3zcq9doYHzeYZZxw/kPAJPxqN1oxnXQs qrXUflP9YNalIlu9xq4XHeUIQnTJCYO6yno8GlAdyUU6r2MfZTHKEQH33 g==; IronPort-SDR: bmt885B7sB42qyUFIg8Ai+nA99pcYSk1NpujNG3d52mQb/bR2QwrU4h9E9YNOTkkhclsoPjcXn 6mFPh61n6Wkr+n9cT/GduH7J2VSnBj3x2LcqDHdDqkb3kfHrMJCJHHIfUn008bKj4UcDHKvL1V vgDMxUSvkoeVki7VixXg8Ifns/K9uHbVuY7e92n6nauNQo4SlKGLJ8dWbkJMGQ7gDFMVLdfeov X/crQcPswjjZjH3UZGk0WC1YMFTTsFJLt0nXhggKZjiyCp6ScOrTMVvhyFzz1Hzpr6DD13FUFR v2g= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158518090" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:12:36 +0800 IronPort-SDR: IDZiMJOlR0+VOY1BNQaARFfYu9OarHLLsVonfFyPXl23zo35odQhgMmfO4kE4VPYKsY+JJiS6q q9jaoN5yUNg29lAe+5M6aOgNPY+vyQFvS1LRen2A0GVS8Z1uRNxF9RTO8S6+4SzRtSVqdMlqlX AP3GAQ3XY8ByxIxbwNN9TH/m25u1gVMooNCMaZLdxpwBcvN9NIziTxpOmNboi77ZZmjclOc1qK Ph77/4p3OETsRa3p0SDjW7eGnujIlX61OeHpf9zBKq75rtapi1JdaKfckOtoqDkXPXsDbqMV93 IKSP19vwUbpQKJr8mfexR6qx Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:54:54 -0800 IronPort-SDR: Luc6lg4Pa+bVHOb4HzkXJiWLGqMg6JC6Nyg0Lqb88ZIBDNylXDUPHvAGuri+ui5nWB8hV8jug9 qFWTXFaOWHAL0oehOyPdERabJ1LaG9aVOt3b6RTgmVCVF9xZaJrmkG+mjzow98LgNG5t1Hjoni gqXmojTILo9AyCGo2PpCozas3remWiyjnR1rz1m7Heq2aoYdQ+f2mWDUtJhIIR3UJyQKknW4V+ XZO06It7hG6XcBrRwkAZf9a8HSkB5bDSC1ddzu75XBYoKVtN9lipurMfP/HgqVuXVuz/kSCAwn InQ= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 27 Jan 2021 23:12:36 -0800 From: Chaitanya Kulkarni To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, xen-devel@lists.xenproject.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-pm@vger.kernel.org, linux-mm@kvack.org Cc: axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, konrad.wilk@oracle.com, roger.pau@citrix.com, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, agk@redhat.com, snitzer@redhat.com, hch@lst.de, sagi@grimberg.me, chaitanya.kulkarni@wdc.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, djwong@kernel.org, shaggy@kernel.org, konishi.ryusuke@gmail.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, akpm@linux-foundation.org, hare@suse.de, gustavoars@kernel.org, tiwai@suse.de, alex.shi@linux.alibaba.com, asml.silence@gmail.com, ming.lei@redhat.com, tj@kernel.org, osandov@fb.com, bvanassche@acm.org, jefflexu@linux.alibaba.com Subject: [RFC PATCH 06/34] zram: use bio_new Date: Wed, 27 Jan 2021 23:11:05 -0800 Message-Id: <20210128071133.60335-7-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 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: Signed-off-by: Chaitanya Kulkarni --- drivers/block/zram/zram_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index d7018543842e..5d744e528d4f 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -587,12 +587,11 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, { struct bio *bio; - bio = bio_alloc(GFP_ATOMIC, 1); + bio = bio_alloc(zram->bdev, entry * (PAGE_SIZE >> 9), 0, 0, + 1, GFP_ATOMIC); if (!bio) return -ENOMEM; - bio->bi_iter.bi_sector = entry * (PAGE_SIZE >> 9); - bio_set_dev(bio, zram->bdev); if (!bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset)) { bio_put(bio); return -EIO;