diff mbox

[v1] aio: mark __aio_sigset::sigmask const

Message ID 20180608145505.29063-1-avi@scylladb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Avi Kivity June 8, 2018, 2:55 p.m. UTC
io_pgetevents() will not change the signal mask. Mark it const
to make it clear and to reduce the need for casts in user code.

Signed-off-by: Avi Kivity <avi@scylladb.com>
---
 include/uapi/linux/aio_abi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig June 11, 2018, 6:56 a.m. UTC | #1
On Fri, Jun 08, 2018 at 05:55:05PM +0300, Avi Kivity wrote:
> io_pgetevents() will not change the signal mask. Mark it const
> to make it clear and to reduce the need for casts in user code.
> 
> Signed-off-by: Avi Kivity <avi@scylladb.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
Christoph Hellwig June 14, 2018, 12:16 p.m. UTC | #2
On Fri, Jun 08, 2018 at 05:55:05PM +0300, Avi Kivity wrote:
> io_pgetevents() will not change the signal mask. Mark it const
> to make it clear and to reduce the need for casts in user code.
> 
> Signed-off-by: Avi Kivity <avi@scylladb.com>

Al, can you pick this one and the masking fix before -rc1?

> ---
>  include/uapi/linux/aio_abi.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
> index ed0185945bb2..cdf115b03761 100644
> --- a/include/uapi/linux/aio_abi.h
> +++ b/include/uapi/linux/aio_abi.h
> @@ -106,11 +106,11 @@ struct iocb {
>  
>  #undef IFBIG
>  #undef IFLITTLE
>  
>  struct __aio_sigset {
> -	sigset_t __user	*sigmask;
> +	const sigset_t __user	*sigmask;
>  	size_t		sigsetsize;
>  };
>  
>  #endif /* __LINUX__AIO_ABI_H */
>  
> -- 
> 2.14.4
---end quoted text---
diff mbox

Patch

diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h
index ed0185945bb2..cdf115b03761 100644
--- a/include/uapi/linux/aio_abi.h
+++ b/include/uapi/linux/aio_abi.h
@@ -106,11 +106,11 @@  struct iocb {
 
 #undef IFBIG
 #undef IFLITTLE
 
 struct __aio_sigset {
-	sigset_t __user	*sigmask;
+	const sigset_t __user	*sigmask;
 	size_t		sigsetsize;
 };
 
 #endif /* __LINUX__AIO_ABI_H */