[Devel] [PATCH VZ10] fs/fuse kio: move struct krpc_completion to the end of struct krpc_req
Liu Kui
kui.liu at virtuozzo.com
Mon May 18 10:40:14 MSK 2026
Though the flexible array in krpc_completion is never used when embedded
in struct krpc_req, it's good practive to place flexible array member at
the end of a struct to avoid any undefined or unexpected behavior.
This a supplemental fix to "fs/fuse kio: replace zero-length array with
flexible array syntax"
Link: https://virtuozzo.atlassian.net/browse/VSTOR-130548
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_krpc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_krpc.h b/fs/fuse/kio/pcs/pcs_krpc.h
index 766121d3a477..96b4815abf86 100644
--- a/fs/fuse/kio/pcs/pcs_krpc.h
+++ b/fs/fuse/kio/pcs/pcs_krpc.h
@@ -131,11 +131,11 @@ struct krpc_req {
int nr_data_bvecs;
struct bio_vec data_bvecs[KRPC_MAX_DATA_PAGES];
- struct krpc_completion completion;
-
u32 gen;
struct llist_node llist_link;
struct pcs_krpc_ioc_sendmsg iocmsg;
+
+ struct krpc_completion completion;
};
static inline u32 pcs_krpc_msg_size(u32 size, u8 flags)
--
2.39.5 (Apple Git-154)
More information about the Devel
mailing list