[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h01e4LgV0c5FxLorcc6iFW2LVzC=hJcd7LNAJ6D0E8jg@mail.gmail.com>
Date: Thu, 28 Jan 2021 11:21:36 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
Cc: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
dm-devel@...hat.com, linux-block@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
drbd-dev@...ts.linbit.com, xen-devel@...ts.xenproject.org,
linux-nvme <linux-nvme@...ts.infradead.org>,
"open list:TARGET SUBSYSTEM" <linux-scsi@...r.kernel.org>,
target-devel@...r.kernel.org, linux-fscrypt@...r.kernel.org,
jfs-discussion@...ts.sourceforge.net, linux-nilfs@...r.kernel.org,
ocfs2-devel@....oracle.com, Linux PM <linux-pm@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Jens Axboe <axboe@...nel.dk>,
Philipp Reisner <philipp.reisner@...bit.com>,
Lars Ellenberg <lars.ellenberg@...bit.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
roger.pau@...rix.com, Minchan Kim <minchan@...nel.org>,
ngupta@...are.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Al Viro <viro@...iv.linux.org.uk>, "Ted Ts'o" <tytso@....edu>,
jaegeuk@...nel.org, Eric Biggers <ebiggers@...nel.org>,
djwong@...nel.org, shaggy@...nel.org, konishi.ryusuke@...il.com,
Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>, damien.lemoal@....com,
naohiro.aota@....com, jth@...nel.org,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Hannes Reinecke <hare@...e.de>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Takashi Iwai <tiwai@...e.de>,
Alex Shi <alex.shi@...ux.alibaba.com>, asml.silence@...il.com,
Ming Lei <ming.lei@...hat.com>, Tejun Heo <tj@...nel.org>,
osandov@...com, Bart Van Assche <bvanassche@....org>,
jefflexu@...ux.alibaba.com
Subject: Re: [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io
On Thu, Jan 28, 2021 at 8:21 AM Chaitanya Kulkarni
<chaitanya.kulkarni@....com> wrote:
>
Please explain in the changelog why making this change is a good idea.
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
> ---
> kernel/power/swap.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/power/swap.c b/kernel/power/swap.c
> index c73f2e295167..e92e36c053a6 100644
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -271,13 +271,12 @@ static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr,
> struct hib_bio_batch *hb)
> {
> struct page *page = virt_to_page(addr);
> + sector_t sect = page_off * (PAGE_SIZE >> 9);
> struct bio *bio;
> int error = 0;
>
> - bio = bio_alloc(GFP_NOIO | __GFP_HIGH, 1);
> - bio->bi_iter.bi_sector = page_off * (PAGE_SIZE >> 9);
> - bio_set_dev(bio, hib_resume_bdev);
> - bio_set_op_attrs(bio, op, op_flags);
> + bio = bio_new(hib_resume_bdev, sect, op, op_flags, 1,
> + GFP_NOIO | __GFP_HIGH);
>
> if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
> pr_err("Adding page to bio failed at %llu\n",
> --
> 2.22.1
>
Powered by blists - more mailing lists