lkml.org 
[lkml]   [2023]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/5] zram: remove the call to page_endio in the bio end_io handler
From
On 2023-03-28 17:19, Matthew Wilcox wrote:
> 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;
>

Looks neat. I will wait for Christoph to comment whether just a bio_put() call
is enough in this case for non-chained bios before making this change for the
next version.

Thanks.

\
 
 \ /
  Last update: 2023-03-28 18:18    [W:0.114 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site