[Devel] [PATCH VZ10 v2 1/7] drivers/vhost/blk: fix uninitialized variable
Andrey Zhadchenko
andrey.zhadchenko at virtuozzo.com
Fri Jun 19 16:33:07 MSK 2026
Set ret to -EAGAIN. If we can't get backend, this means we are
in the proccess of shutting down or suspending. The request will
be read again from virtqueue some time later.
https://virtuozzo.atlassian.net/browse/VSTOR-134034
Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
drivers/vhost/blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vhost/blk.c b/drivers/vhost/blk.c
index a3f01d55865a7..e4236df2f2161 100644
--- a/drivers/vhost/blk.c
+++ b/drivers/vhost/blk.c
@@ -406,7 +406,7 @@ static int vhost_blk_req_submit(struct vhost_blk_req *req)
{
struct block_device *bdev;
struct file *f;
- int ret;
+ int ret = -EAGAIN;
note_request(req);
--
2.43.5
More information about the Devel
mailing list