aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-08-11 12:08:22 +0200
committerChristian Brauner <brauner@kernel.org>2023-08-21 14:35:31 +0200
commit2527fd38772fea30c1d1cbf94839a0bbf4122133 (patch)
tree50c741bacf5955667d194117c653c4ed5de4bb27
parentamiflop: don't call fsync_bdev in FDFMTBEG (diff)
downloadwireguard-linux-2527fd38772fea30c1d1cbf94839a0bbf4122133.tar.xz
wireguard-linux-2527fd38772fea30c1d1cbf94839a0bbf4122133.zip
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>
-rw-r--r--drivers/s390/block/dasd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index edcbf77852c3..675b38ad00dc 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -3627,9 +3627,8 @@ int dasd_generic_set_offline(struct ccw_device *cdev)
* empty
*/
if (device->block) {
- rc = fsync_bdev(device->block->bdev);
- if (rc != 0)
- goto interrupted;
+ fsync_bdev(device->block->bdev);
+ __invalidate_device(device->block->bdev, true);
}
dasd_schedule_device_bh(device);
rc = wait_event_interruptible(shutdown_waitq,