From 683698cc47e6ffcedd3a1df5def6253d7638aa7c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 24 Jun 2021 03:57:17 +0000 Subject: [PATCH] scst_vdisk, vdisk_blockio: Fix the resync_size functionality (trunk r9386) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.5.x@9462 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 0da1c2672..6317c87b0 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -6729,7 +6729,7 @@ static int vdisk_resync_size(struct scst_vdisk_dev *virt_dev) sBUG_ON(virt_dev->nullio); sBUG_ON(!virt_dev->filename); - if ((virt_dev->fd == NULL) || !virt_dev->dev_active) { + if ((!virt_dev->fd && !virt_dev->bdev) || !virt_dev->dev_active) { res = -EMEDIUMTYPE; goto out; }