@@ -1980,15 +1980,11 @@ static int lbmRead(struct jfs_log * log, int pn, struct lbuf ** bpp)
bp->l_flag |= lbmREAD;
bio = bio_alloc(GFP_NOFS, 1);
-
- bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
- bio_set_dev(bio, log->bdev);
-
+ bio_init_fields(bio, log->bdev, bp->l_blkno << (log->l2bsize - 9),
+ log->bdev, 0, lbmIODone, bp, 0, 0);
bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);
BUG_ON(bio->bi_iter.bi_size != LOGPSIZE);
- bio->bi_end_io = lbmIODone;
- bio->bi_private = bp;
bio->bi_opf = REQ_OP_READ;
/*check if journaling to disk has been disabled*/
if (log->no_integrity) {
@@ -2125,14 +2121,10 @@ static void lbmStartIO(struct lbuf * bp)
jfs_info("lbmStartIO");
bio = bio_alloc(GFP_NOFS, 1);
- bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
- bio_set_dev(bio, log->bdev);
-
+ bio_init_fields(bio, log->bdev, bp->l_blkno << (log->l2bsize - 9),
+ log->bdev, 0, lbmIODone, bp, 0, 0);
bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);
BUG_ON(bio->bi_iter.bi_size != LOGPSIZE);
-
- bio->bi_end_io = lbmIODone;
- bio->bi_private = bp;
bio->bi_opf = REQ_OP_WRITE | REQ_SYNC;
/* check if journaling to disk has been disabled */
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> --- fs/jfs/jfs_logmgr.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)