Revert "virtio_pmem: Check device status before requesting flush"

This reverts commit 0da7dd9adf.
This commit is contained in:
Ksawlii 2024-11-24 00:22:58 +01:00
parent 0d9e5720e8
commit a9b637cee6

View file

@ -44,15 +44,6 @@ static int virtio_pmem_flush(struct nd_region *nd_region)
unsigned long flags;
int err, err1;
/*
* Don't bother to submit the request to the device if the device is
* not activated.
*/
if (vdev->config->get_status(vdev) & VIRTIO_CONFIG_S_NEEDS_RESET) {
dev_info(&vdev->dev, "virtio pmem device needs a reset\n");
return -EIO;
}
might_sleep();
req_data = kmalloc(sizeof(*req_data), GFP_KERNEL);
if (!req_data)