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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Bernd Schubert <bschubert@xxxxxxx>
---
 fs/fuse/dev_uring.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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);

-- 
2.43.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux