From 660fb57d3a7a9f07e3b9509d1ab0cc4b6787a60a Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 21 Apr 2017 01:11:37 +0000 Subject: [PATCH] scst: set file size for NULLIO in PROCFS build The file size wasn't getting set for NULLIO with /proc support Signed-off-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7141 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 41d93781e..e4ac44897 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1700,6 +1700,11 @@ next: dev->dev_rd_only = virt_dev->rd_only; +#ifdef CONFIG_SCST_PROC + if (virt_dev->nullio && !virt_dev->file_size) + virt_dev->file_size = VDISK_NULLIO_SIZE; +#endif + res = vdisk_reexamine(virt_dev); if (res < 0) goto out;