[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210517093428.670-15-xieyongji@bytedance.com>
Date: Mon, 17 May 2021 17:34:27 +0800
From: Xie Yongji <xieyongji@...edance.com>
To: mst@...hat.com, jasowang@...hat.com, stefanha@...hat.com
Cc: amit@...nel.org, arei.gonglei@...wei.com, airlied@...ux.ie,
kraxel@...hat.com, jean-philippe@...aro.org, ohad@...ery.com,
bjorn.andersson@...aro.org, david@...hat.com, vgoyal@...hat.com,
miklos@...redi.hu, lucho@...kov.net, asmadeus@...ewreck.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 14/15] virtiofs: Handle virtio_device_ready() failure
Now virtio_device_ready() will return error if we get
invalid status. Let's handle this case on probe.
Signed-off-by: Xie Yongji <xieyongji@...edance.com>
---
fs/fuse/virtio_fs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index e61c94eaa20f..ade0dc42ebfd 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -883,7 +883,9 @@ static int virtio_fs_probe(struct virtio_device *vdev)
/* Bring the device online in case the filesystem is mounted and
* requests need to be sent before we return.
*/
- virtio_device_ready(vdev);
+ ret = virtio_device_ready(vdev);
+ if (ret < 0)
+ goto out_vqs;
ret = virtio_fs_add_instance(fs);
if (ret < 0)
--
2.11.0
Powered by blists - more mailing lists