Message ID | 20240222124555.2049140-11-yukuai1@huaweicloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fs & block: remove bdev->bd_inode | expand |
On Thu 22-02-24 20:45:46, Yu Kuai wrote: > From: Yu Kuai <yukuai3@huawei.com> > > Avoid to access bd_inode directly, prepare to remove bd_inode from > block_devcie. > > Signed-off-by: Yu Kuai <yukuai3@huawei.com> Makes sense. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > drivers/s390/block/dasd_ioctl.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c > index 7e0ed7032f76..c1201590f343 100644 > --- a/drivers/s390/block/dasd_ioctl.c > +++ b/drivers/s390/block/dasd_ioctl.c > @@ -215,8 +215,9 @@ dasd_format(struct dasd_block *block, struct format_data_t *fdata) > * enabling the device later. > */ > if (fdata->start_unit == 0) { > - block->gdp->part0->bd_inode->i_blkbits = > - blksize_bits(fdata->blksize); > + rc = set_blocksize(block->gdp->part0, fdata->blksize); > + if (rc) > + return rc; > } > > rc = base->discipline->format_device(base, fdata, 1); > -- > 2.39.2 >
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 7e0ed7032f76..c1201590f343 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c @@ -215,8 +215,9 @@ dasd_format(struct dasd_block *block, struct format_data_t *fdata) * enabling the device later. */ if (fdata->start_unit == 0) { - block->gdp->part0->bd_inode->i_blkbits = - blksize_bits(fdata->blksize); + rc = set_blocksize(block->gdp->part0, fdata->blksize); + if (rc) + return rc; } rc = base->discipline->format_device(base, fdata, 1);