mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
virtio-fs: fix incorrect check for fsvq->kobj
[ Upstream commitc014021253] 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:87cbdc396a("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
513bb0f569
commit
c1e93a5e61
@@ -373,7 +373,7 @@ static int virtio_fs_add_queues_sysfs(struct virtio_fs *fs)
|
||||
|
||||
sprintf(buff, "%d", i);
|
||||
fsvq->kobj = kobject_create_and_add(buff, fs->mqs_kobj);
|
||||
if (!fs->mqs_kobj) {
|
||||
if (!fsvq->kobj) {
|
||||
ret = -ENOMEM;
|
||||
goto out_del;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user