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

* Re: [PATCH] virtio-fs: fix incorrect check for fsvq->kobj
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2025-10-27 13:47 UTC (permalink / raw)
  To: Alok Tiwari
  Cc: mgurtovoy, izach, smalin, vgoyal, miklos, eperezma, mst, jasowang,
	virtualization, linux-fsdevel, alok.a.tiwarilinux, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

On Mon, Oct 27, 2025 at 03:46:47AM -0700, Alok Tiwari wrote:
> 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(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] virtio-fs: fix incorrect check for fsvq->kobj
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-10-29 15:50 UTC (permalink / raw)
  To: mgurtovoy, izach, smalin, vgoyal, stefanha, miklos, eperezma, mst,
	jasowang, virtualization, linux-fsdevel, Alok Tiwari
  Cc: Christian Brauner, alok.a.tiwarilinux, linux-kernel

On Mon, 27 Oct 2025 03:46:47 -0700, Alok Tiwari wrote:
> 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.
> 
> 

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] virtio-fs: fix incorrect check for fsvq->kobj
      https://git.kernel.org/vfs/vfs/c/a20432b6571d

^ permalink raw reply	[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).