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

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

 



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@xxxxxxxx>
---
 src/include/liburing.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux