Message ID | 20210128071133.60335-34-chaitanya.kulkarni@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=lfe4=G7=oss.oracle.com=ocfs2-devel-bounces@kernel.org> 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.7 required=3.0 tests=BAYES_00, 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 23D03C433E0 for <ocfs2-devel@archiver.kernel.org>; Thu, 28 Jan 2021 08:13:20 +0000 (UTC) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A789160C41 for <ocfs2-devel@archiver.kernel.org>; Thu, 28 Jan 2021 08:13:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A789160C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=ocfs2-devel-bounces@oss.oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S89EER139046; Thu, 28 Jan 2021 08:13:18 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 368brktrx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Jan 2021 08:13:18 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S8Bnf1106939; Thu, 28 Jan 2021 08:13:17 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by userp3020.oracle.com with ESMTP id 368wjtq533-1 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO); Thu, 28 Jan 2021 08:13:17 +0000 Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <ocfs2-devel-bounces@oss.oracle.com>) id 1l51hv-0003bP-HK; Wed, 27 Jan 2021 23:27:11 -0800 Received: from aserp3030.oracle.com ([141.146.126.71]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <prvs=655a99766=chaitanya.kulkarni@wdc.com>) id 1l51XK-0002v4-Bb for ocfs2-devel@oss.oracle.com; Wed, 27 Jan 2021 23:16:14 -0800 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S71Aw7050208 for <ocfs2-devel@oss.oracle.com>; Thu, 28 Jan 2021 07:16:14 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp3030.oracle.com with ESMTP id 368wcq98ka-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Thu, 28 Jan 2021 07:16:14 +0000 Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10S74PD0040689 for <ocfs2-devel@oss.oracle.com>; Thu, 28 Jan 2021 07:16:13 GMT Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by userp2030.oracle.com with ESMTP id 36bqd38xyv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <ocfs2-devel@oss.oracle.com>; Thu, 28 Jan 2021 07:16:13 +0000 IronPort-SDR: FsRZfSeuxwVbRkm1dV0RwVYjEOFc9X/fXNvqzjX1U3A4HFZ+zCxtdmJNX7U+iU1IVWK2+FzO2U FJVQ6VoHGrboqPu35sSX/R1z+XVQejHD2+nMyhc0Eclo2p4AwaxyYcf4jDM8QPacqLPu6yaHYh 3RBbM0oV8tH4W+zpGOPc42aV1cO1S4YMVG2wxInzJU4bTUmaOwELZQUz55ENK+dXvvkbA4+/Q1 UC4ywuMLdQzBn1C+z3ZWB31kShf0BiL9eI+IYHcMvjUtUPSNCfQZi5KHrkqRZkDIF5g62wKqct qbw= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="159694087" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:16:11 +0800 IronPort-SDR: 46lTD0sk382ICxisWTizvgH50k/mGVfAiijjTSNYJqjn8KgXOsSXdO/YsLkdE+8NR37WXW9X/X 1Y9rUFCo+yH+cTNXfkzeZVs4+W8GRdzLHw8NAVUJ8/MFYfEObuM3/ewc7YRuPkJ9jCo34SlTZa N1T8pWwoaM1ggNBNKlbnC5KoBH63KmjjB2SDzT+5wnP0RftbBUmrX6gT0otml2zv/9Jf1Q47TM 82gyt4iKQfuqV8v9pjglfb9yt8WdVLPG2tbNbDbZiS6adT0O8uBDiQlykm4Zt76S4KU1fWNtCp 5G/HQfxi4peCON8AhcQcLIpt 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:58:29 -0800 IronPort-SDR: g9DYrZw82vrtcoqwLuT41C5LPwtay4x47njX4TQvn100PG3qzIQDYIPSbD2aKZ0nambVfkCSmu JHC6z8/1ifbcXhuz1R2nfguMjBFRQ4RaTCr3wehJDb3ERuWQ1NBrP8es0szoYDQyY3216WdfEV JcMopMzzk+/Wudlq5O10ELulyKCOeTk+PuDGw5+9rtJas4CG58lZZY6nLuQYmFyKdDpDYbQYnL x05lIaxi3M2yfAJSgs6mfnc20aeVZIpUbieSq2c4z3+si2ic8ziehclZMxZZAWaM0XsUZa2+hJ /C8= 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:16:11 -0800 From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> 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 Date: Wed, 27 Jan 2021 23:11:32 -0800 Message-Id: <20210128071133.60335-34-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-PDR: PASS X-Source-IP: 216.71.154.45 X-ServerName: esa6.hgst.iphmx.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ptr ip4:35.160.12.30 ip4:52.34.195.46 ip4:35.162.181.10 ip4:35.162.44.129 ip4:68.232.141.245 ip4:68.232.143.124 ip4:52.36.78.170 ip4:52.86.68.205 ip4:52.86.226.44 ip4:68.232.142.99 ip4:68.232.148.20 ip4:52.26.217.74 ip4:54.187.119.58 ip4:216.71.154.42 ip4:68.232.143.124 ip4:68.232.141.245 ip4:216.71.153.141 ip4:216.71.153.144 ip4:216.71.154.45 ip4:199.255.45.14 ip4:199.255.45.15 include:spf.mandrillapp.com include:servers.mcsv.net include:spf.protection.outlook.com -all X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 phishscore=0 clxscore=233 mlxlogscore=557 spamscore=0 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 suspectscore=0 priorityscore=175 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280034 X-Spam: Clean X-Mailman-Approved-At: Wed, 27 Jan 2021 23:27:08 -0800 Cc: shaggy@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, gustavoars@kernel.org, pavel@ucw.cz, alex.shi@linux.alibaba.com, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, osandov@fb.com, ebiggers@kernel.org, ngupta@vflare.org, len.brown@intel.com, chaitanya.kulkarni@wdc.com, konrad.wilk@oracle.com, hare@suse.de, ming.lei@redhat.com, viro@zeniv.linux.org.uk, jefflexu@linux.alibaba.com, jaegeuk@kernel.org, konishi.ryusuke@gmail.com, bvanassche@acm.org, axboe@kernel.dk, damien.lemoal@wdc.com, tytso@mit.edu, rjw@rjwysocki.net, philipp.reisner@linbit.com, minchan@kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, roger.pau@citrix.com Subject: [Ocfs2-devel] [RFC PATCH 33/34] mm: use bio_new in swap_readpage X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9877 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0 mlxscore=0 suspectscore=0 malwarescore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101280040 |
Series |
block: introduce bio_new()
|
expand
|
diff --git a/mm/page_io.c b/mm/page_io.c index 25b321489703..7579485ccb5e 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -342,7 +342,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, return 0; } - bio = bio_alloc(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, + bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_WRITE, REQ_SWAP | wbc_to_write_flags(wbc), 1, GFP_NOIO); bio->bi_end_io = end_write_func; bio_add_page(bio, page, thp_size(page), 0); @@ -406,10 +406,8 @@ int swap_readpage(struct page *page, bool synchronous) } ret = 0; - bio = bio_alloc(GFP_KERNEL, 1); - bio_set_dev(bio, sis->bdev); - bio->bi_opf = REQ_OP_READ; - bio->bi_iter.bi_sector = swap_page_sector(page); + bio = bio_new(sis->bdev, swap_page_sector(page), REQ_OP_READ, 0, 1, + GFP_KERNEL); bio->bi_end_io = end_swap_bio_read; bio_add_page(bio, page, thp_size(page), 0);
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> --- mm/page_io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)