Thread (97 messages) 97 messages, 9 authors, 2024-03-25

[RFC v4 linux-next 10/19] s390/dasd: use bdev api in dasd_format()

From: Yu Kuai <hidden>
Date: 2024-02-22 12:51:43
Also in: linux-fsdevel
Subsystem: s390 architecture, s390 dasd driver, the rest · Maintainers: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Stefan Haberland, Jan Hoeppner, Linus Torvalds

From: Yu Kuai <redacted>

Avoid to access bd_inode directly, prepare to remove bd_inode from
block_devcie.

Signed-off-by: Yu Kuai <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help