On (23/04/03 13:42), Andrew Morton wrote: [..] > zram_bvec_read() is called with the bio set to NULL only in > writeback_store() function. When a writeback is triggered, > zram_bvec_read() is called only if ZRAM_WB flag is not set. That will > result only calling zram_read_from_zspool() in __zram_bvec_read(). > > rw_page callback used to call read_from_bdev_async with a NULL parent bio > but that has been removed since commit 3222d8c2a7f8 ("block: remove > ->rw_page"). > > We can now safely always call bio_chain() as read_from_bdev_async() will > be called with a parent bio set. A WARN_ON_ONCE is added if this function > is called with parent set to NULL. > > Link: https://lore.kernel.org/linux-mm/ZBHcl8Pz2ULb4RGD@xxxxxxxxxxxxx/ [1] > Link: https://lore.kernel.org/linux-mm/20230322135013.197076-1-p.raghav@xxxxxxxxxxx/ [2] > Link: https://lore.kernel.org/linux-mm/8adb0770-6124-e11f-2551-6582db27ed32@xxxxxxxxxxx/ [3] > Link: https://lkml.kernel.org/r/20230403132221.94921-2-p.raghav@xxxxxxxxxxx > Signed-off-by: Pankaj Raghav <p.raghav@xxxxxxxxxxx> > Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> > Cc: Christian Brauner <brauner@xxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Jens Axboe <axboe@xxxxxxxxx> > Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> > Cc: Martin Brandenburg <martin@xxxxxxxxxxxx> > Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > Cc: Mike Marshall <hubcap@xxxxxxxxxxxx> > Cc: Minchan Kim <minchan@xxxxxxxxxx> > Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Tested-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>