Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc fixes from Al Viro: "Loose ends and regressions from the last merge window. Strictly speaking, only binfmt_flat thing is a build regression per se - the rest is 'only sparse cares about that' stuff" [ This came in before the 4.13 release and could have gone there, but it was late in the release and nothing seemed critical enough to care, so I'm pulling it in the 4.14 merge window instead - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp() compat_hdio_ioctl: Fix a declaration <linux/uaccess.h>: Fix copy_in_user() declaration annotate RWF_... flags teach SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE to handle __bitwise arguments
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#define __LINUX__AIO_ABI_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
typedef __kernel_ulong_t aio_context_t;
|
||||
@@ -62,14 +63,6 @@ struct io_event {
|
||||
__s64 res2; /* secondary result */
|
||||
};
|
||||
|
||||
#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
|
||||
#define PADDED(x,y) x, y
|
||||
#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
|
||||
#define PADDED(x,y) y, x
|
||||
#else
|
||||
#error edit for your odd byteorder.
|
||||
#endif
|
||||
|
||||
/*
|
||||
* we always use a 64bit off_t when communicating
|
||||
* with userland. its up to libraries to do the
|
||||
@@ -79,8 +72,16 @@ struct io_event {
|
||||
struct iocb {
|
||||
/* these are internal to the kernel/libc. */
|
||||
__u64 aio_data; /* data to be returned in event's data */
|
||||
__u32 PADDED(aio_key, aio_rw_flags);
|
||||
/* the kernel sets aio_key to the req # */
|
||||
|
||||
#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
|
||||
__u32 aio_key; /* the kernel sets aio_key to the req # */
|
||||
__kernel_rwf_t aio_rw_flags; /* RWF_* flags */
|
||||
#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
|
||||
__kernel_rwf_t aio_rw_flags; /* RWF_* flags */
|
||||
__u32 aio_key; /* the kernel sets aio_key to the req # */
|
||||
#else
|
||||
#error edit for your odd byteorder.
|
||||
#endif
|
||||
|
||||
/* common fields */
|
||||
__u16 aio_lio_opcode; /* see IOCB_CMD_ above */
|
||||
|
||||
@@ -358,13 +358,25 @@ struct fscrypt_key {
|
||||
#define SYNC_FILE_RANGE_WRITE 2
|
||||
#define SYNC_FILE_RANGE_WAIT_AFTER 4
|
||||
|
||||
/* flags for preadv2/pwritev2: */
|
||||
#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */
|
||||
#define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC */
|
||||
#define RWF_SYNC 0x00000004 /* per-IO O_SYNC */
|
||||
#define RWF_NOWAIT 0x00000008 /* per-IO, return -EAGAIN if operation would block */
|
||||
/*
|
||||
* Flags for preadv2/pwritev2:
|
||||
*/
|
||||
|
||||
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC |\
|
||||
RWF_NOWAIT)
|
||||
typedef int __bitwise __kernel_rwf_t;
|
||||
|
||||
/* high priority request, poll if possible */
|
||||
#define RWF_HIPRI ((__force __kernel_rwf_t)0x00000001)
|
||||
|
||||
/* per-IO O_DSYNC */
|
||||
#define RWF_DSYNC ((__force __kernel_rwf_t)0x00000002)
|
||||
|
||||
/* per-IO O_SYNC */
|
||||
#define RWF_SYNC ((__force __kernel_rwf_t)0x00000004)
|
||||
|
||||
/* per-IO, return -EAGAIN if operation would block */
|
||||
#define RWF_NOWAIT ((__force __kernel_rwf_t)0x00000008)
|
||||
|
||||
/* mask of flags supported by the kernel */
|
||||
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)
|
||||
|
||||
#endif /* _UAPI_LINUX_FS_H */
|
||||
|
||||
Reference in New Issue
Block a user