Revert "jfs: fix log->bdev_handle null ptr deref in lbmStartIO"

This reverts commit e4a4435787 which is
commit 6306ff39a7 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I2845dc3c8915a89970201a26fe3d4da1684c9e60
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2024-08-30 08:10:56 +00:00
parent d09a1b6c70
commit a1f8d07b9e

View File

@ -2110,14 +2110,10 @@ static void lbmStartIO(struct lbuf * bp)
{
struct bio *bio;
struct jfs_log *log = bp->l_log;
struct block_device *bdev = NULL;
jfs_info("lbmStartIO");
if (!log->no_integrity)
bdev = log->bdev_handle->bdev;
bio = bio_alloc(bdev, 1, REQ_OP_WRITE | REQ_SYNC,
bio = bio_alloc(log->bdev_handle->bdev, 1, REQ_OP_WRITE | REQ_SYNC,
GFP_NOFS);
bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
__bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);