diff mbox series

[liburing,2/2] fix len type of fgettxattr etc

Message ID 20221019145042.446477-3-dylany@meta.com (mailing list archive)
State New
Headers show
Series liburing: fix shortening api issues | expand

Commit Message

Dylan Yudaken Oct. 19, 2022, 2:50 p.m. UTC
The size_t len was passed to an unsigned int directly.
Take an unsigned int instead which is what is expected by io_uring_prep_rw

Fixes: 73849e908ce0 ("liburing: Add helper functions for fgetxattr and getxattr")
Fixes: 72f55e271377 ("liburing: add helper functions for setxattr and fsetxattr")
Signed-off-by: Dylan Yudaken <dylany@meta.com>
---
 src/include/liburing.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/src/include/liburing.h b/src/include/liburing.h
index 118bba9eea15..780a19ccb1d9 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -991,7 +991,7 @@  static inline void io_uring_prep_getxattr(struct io_uring_sqe *sqe,
 					  const char *name,
 					  char *value,
 					  const char *path,
-					  size_t len)
+					  unsigned int len)
 {
 	io_uring_prep_rw(IORING_OP_GETXATTR, sqe, 0, name, len,
 				(__u64) (uintptr_t) value);
@@ -1004,7 +1004,7 @@  static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
 					  const char *value,
 					  const char *path,
 					  int flags,
-					  size_t len)
+					  unsigned int len)
 {
 	io_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len,
 				(__u64) (uintptr_t) value);
@@ -1013,10 +1013,10 @@  static inline void io_uring_prep_setxattr(struct io_uring_sqe *sqe,
 }
 
 static inline void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,
-		                           int         fd,
+					   int fd,
 					   const char *name,
 					   char *value,
-					   size_t      len)
+					   unsigned int len)
 {
 	io_uring_prep_rw(IORING_OP_FGETXATTR, sqe, fd, name, len,
 				(__u64) (uintptr_t) value);
@@ -1024,11 +1024,11 @@  static inline void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,
 }
 
 static inline void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe,
-					   int         fd,
-					   const char *name,
-					   const char *value,
-					   int         flags,
-					   size_t      len)
+					   int		fd,
+					   const char	*name,
+					   const char	*value,
+					   int		flags,
+					   unsigned int len)
 {
 	io_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len,
 				(__u64) (uintptr_t) value);