diff mbox series

[2/5] fuse: Remove an err= assignment and move a comment

Message ID 20250123-fuse-uring-for-6-14-incremental-to-v10-v1-2-8aee9f27c066@ddn.com (mailing list archive)
State New
Headers show
Series fuse: over-io-uring fixes | expand

Commit Message

Bernd Schubert Jan. 23, 2025, 4:55 p.m. UTC
The err assignment is not needed as it was already set to that value before
and comment is better in the calling function, as it is about the
queue object that.

Fixes: fuse: {io-uring} Handle SQEs - register commands
Spotted in review by: Luis Henriques <luis@igalia.com>
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
---
 fs/fuse/dev_uring.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index 8e15acb3d350d223c64423233f3613b6eee075da..8e46cddde34539af398290f26db120713520ee51 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -1018,10 +1018,6 @@  fuse_uring_create_ring_ent(struct io_uring_cmd *cmd,
 		return ERR_PTR(err);
 	}
 
-	/*
-	 * The created queue above does not need to be destructed in
-	 * case of entry errors below, will be done at ring destruction time.
-	 */
 	err = -ENOMEM;
 	ent = kzalloc(sizeof(*ent), GFP_KERNEL_ACCOUNT);
 	if (!ent)
@@ -1063,7 +1059,6 @@  static int fuse_uring_register(struct io_uring_cmd *cmd,
 		return -EINVAL;
 	}
 
-	err = -ENOMEM;
 	queue = ring->queues[qid];
 	if (!queue) {
 		queue = fuse_uring_create_queue(ring, qid);
@@ -1071,6 +1066,11 @@  static int fuse_uring_register(struct io_uring_cmd *cmd,
 			return err;
 	}
 
+	/*
+	 * The created queue above does not need to be destructed in
+	 * case of entry errors below, will be done at ring destruction time.
+	 */
+
 	ent = fuse_uring_create_ring_ent(cmd, queue);
 	if (IS_ERR(ent))
 		return PTR_ERR(ent);