Skip to content

Commit 2527fd3

Browse files
Christoph Hellwigbrauner
authored andcommitted
dasd: also call __invalidate_device when setting the device offline
Don't just write out the data, but also invalidate all caches when setting the device offline. Stop canceling the offlining when writeback fails as there is no way to recover from that anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Message-Id: <20230811100828.1897174-12-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 2c0326c commit 2527fd3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/s390/block/dasd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,9 +3627,8 @@ int dasd_generic_set_offline(struct ccw_device *cdev)
36273627
* empty
36283628
*/
36293629
if (device->block) {
3630-
rc = fsync_bdev(device->block->bdev);
3631-
if (rc != 0)
3632-
goto interrupted;
3630+
fsync_bdev(device->block->bdev);
3631+
__invalidate_device(device->block->bdev, true);
36333632
}
36343633
dasd_schedule_device_bh(device);
36353634
rc = wait_event_interruptible(shutdown_waitq,

0 commit comments

Comments
 (0)