Skip to content

Commit c014021

Browse files
aloktiwabrauner
authored andcommitted
virtio-fs: fix incorrect check for fsvq->kobj
In virtio_fs_add_queues_sysfs(), the code incorrectly checks fs->mqs_kobj after calling kobject_create_and_add(). Change the check to fsvq->kobj (fs->mqs_kobj -> fsvq->kobj) to ensure the per-queue kobject is successfully created. Fixes: 87cbdc3 ("virtio_fs: add sysfs entries for queue information") Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com> Link: https://patch.msgid.link/20251027104658.1668537-1-alok.a.tiwari@oracle.com Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 9db8d46 commit c014021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/fuse/virtio_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int virtio_fs_add_queues_sysfs(struct virtio_fs *fs)
373373

374374
sprintf(buff, "%d", i);
375375
fsvq->kobj = kobject_create_and_add(buff, fs->mqs_kobj);
376-
if (!fs->mqs_kobj) {
376+
if (!fsvq->kobj) {
377377
ret = -ENOMEM;
378378
goto out_del;
379379
}

0 commit comments

Comments
 (0)