linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio-fs: fix incorrect check for fsvq->kobj
@ 2025-10-27 10:46 Alok Tiwari
  2025-10-27 13:47 ` Stefan Hajnoczi
  2025-10-29 15:50 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-10-27 10:46 UTC (permalink / raw)
  To: mgurtovoy, izach, smalin, vgoyal, stefanha, miklos, eperezma, mst,
	jasowang, virtualization, linux-fsdevel, alok.a.tiwari
  Cc: alok.a.tiwarilinux, linux-kernel

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: 87cbdc396a31 ("virtio_fs: add sysfs entries for queue information")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
 fs/fuse/virtio_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 6bc7c97b017d..b2f6486fe1d5 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -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;
 		}
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-29 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 10:46 [PATCH] virtio-fs: fix incorrect check for fsvq->kobj Alok Tiwari
2025-10-27 13:47 ` Stefan Hajnoczi
2025-10-29 15:50 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).