Skip to contentSkip to conversation

fuse: fix the io_uring flag processing in init reply

PATCH In review Feng Shuo 2 participants 3 messages Jun 14, 2025 – Jun 15, 2025

Subsystems (2)
lore
Share & tools
lore

Feng Shuo

author
#0 lore raw

PATCH 1/1 fuse: fix the io_uring flag processing in init reply

Fix the expression of the io_uring flag processing.

---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/inode.c +1 -1
index bfe8d8af46f3..ef0ab9a6893c 100644
@@ -1434,7 +1434,7 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
 				else
 					ok = false;
 			}
-			if (flags & FUSE_OVER_IO_URING && fuse_uring_enabled())
+			if ((flags & FUSE_OVER_IO_URING) && fuse_uring_enabled())
 				fc->io_uring = 1;
 
 			if (flags & FUSE_REQUEST_TIMEOUT)
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Feng Shuo

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Fix the expression of the io_uring flag processing.

---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/inode.c +1 -2
index bfe8d8af46f3..ef0ab9a6893c 100644
@@ -1434,7 +1434,7 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
                                else
                                        ok = false;
                        }
-                       if (flags & FUSE_OVER_IO_URING && fuse_uring_enabled())
+                       if ((flags & FUSE_OVER_IO_URING) && fuse_uring_enabled())
                                fc->io_uring = 1;
 
                        if (flags & FUSE_REQUEST_TIMEOUT)
--
Quoted 1 line

2.43.0

Hi Shuo,

I don't think it is a 'fix', because the '&' operatpr has higher precedence, for readability you are definitely right.

Maybe something like

fuse: Add parentheses around bitwise operation in conditional

Add parentheses around the bitwise AND operation in the io_uring condition check for better readability.

With an updated commit message/subject:

Thanks,
Bernd

author
#2 lore raw

Thank you Bernd. I will send a new patch.

-- Feng Shuo

Quoted 49 lines · Bernd Schubert
Quoted 23 lines · Feng Shuo

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Fix the expression of the io_uring flag processing.

---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/inode.c +1 -2
index bfe8d8af46f3..ef0ab9a6893c 100644
@@ -1434,7 +1434,7 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
                                else
                                        ok = false;
                        }
-                       if (flags & FUSE_OVER_IO_URING && fuse_uring_enabled())
+                       if ((flags & FUSE_OVER_IO_URING) && fuse_uring_enabled())
                                fc->io_uring = 1;
 
                        if (flags & FUSE_REQUEST_TIMEOUT)
--
Quoted 1 line

2.43.0

Hi Shuo,

I don't think it is a 'fix', because the '&' operatpr has higher precedence, for readability you are definitely right.

Maybe something like

fuse: Add parentheses around bitwise operation in conditional

Add parentheses around the bitwise AND operation in the io_uring condition check for better readability.

With an updated commit message/subject:

Thanks,
Bernd