Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull aio updates from Al Viro: "Majority of AIO stuff this cycle. aio-fsync and aio-poll, mostly. The only thing I'm holding back for a day or so is Adam's aio ioprio - his last-minute fixup is trivial (missing stub in !CONFIG_BLOCK case), but let it sit in -next for decency sake..." * 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) aio: sanitize the limit checking in io_submit(2) aio: fold do_io_submit() into callers aio: shift copyin of iocb into io_submit_one() aio_read_events_ring(): make a bit more readable aio: all callers of aio_{read,write,fsync,poll} treat 0 and -EIOCBQUEUED the same way aio: take list removal to (some) callers of aio_complete() aio: add missing break for the IOCB_CMD_FDSYNC case random: convert to ->poll_mask timerfd: convert to ->poll_mask eventfd: switch to ->poll_mask pipe: convert to ->poll_mask crypto: af_alg: convert to ->poll_mask net/rxrpc: convert to ->poll_mask net/iucv: convert to ->poll_mask net/phonet: convert to ->poll_mask net/nfc: convert to ->poll_mask net/caif: convert to ->poll_mask net/bluetooth: convert to ->poll_mask net/sctp: convert to ->poll_mask net/tipc: convert to ->poll_mask ...
This commit is contained in:
@@ -8,8 +8,6 @@ struct kioctx;
|
||||
struct kiocb;
|
||||
struct mm_struct;
|
||||
|
||||
#define KIOCB_KEY 0
|
||||
|
||||
typedef int (kiocb_cancel_fn)(struct kiocb *);
|
||||
|
||||
/* prototypes */
|
||||
|
@@ -330,6 +330,7 @@ extern int put_compat_rusage(const struct rusage *,
|
||||
struct compat_rusage __user *);
|
||||
|
||||
struct compat_siginfo;
|
||||
struct __compat_aio_sigset;
|
||||
|
||||
struct compat_dirent {
|
||||
u32 d_ino;
|
||||
@@ -553,6 +554,12 @@ asmlinkage long compat_sys_io_getevents(compat_aio_context_t ctx_id,
|
||||
compat_long_t nr,
|
||||
struct io_event __user *events,
|
||||
struct compat_timespec __user *timeout);
|
||||
asmlinkage long compat_sys_io_pgetevents(compat_aio_context_t ctx_id,
|
||||
compat_long_t min_nr,
|
||||
compat_long_t nr,
|
||||
struct io_event __user *events,
|
||||
struct compat_timespec __user *timeout,
|
||||
const struct __compat_aio_sigset __user *usig);
|
||||
|
||||
/* fs/cookies.c */
|
||||
asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
|
||||
|
@@ -1711,6 +1711,8 @@ struct file_operations {
|
||||
int (*iterate) (struct file *, struct dir_context *);
|
||||
int (*iterate_shared) (struct file *, struct dir_context *);
|
||||
__poll_t (*poll) (struct file *, struct poll_table_struct *);
|
||||
struct wait_queue_head * (*get_poll_head)(struct file *, __poll_t);
|
||||
__poll_t (*poll_mask) (struct file *, __poll_t);
|
||||
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
|
||||
int (*mmap) (struct file *, struct vm_area_struct *);
|
||||
|
@@ -147,6 +147,7 @@ struct proto_ops {
|
||||
int (*getname) (struct socket *sock,
|
||||
struct sockaddr *addr,
|
||||
int peer);
|
||||
__poll_t (*poll_mask) (struct socket *sock, __poll_t events);
|
||||
__poll_t (*poll) (struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
int (*ioctl) (struct socket *sock, unsigned int cmd,
|
||||
|
@@ -74,6 +74,18 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
|
||||
pt->_key = ~(__poll_t)0; /* all events enabled */
|
||||
}
|
||||
|
||||
static inline bool file_has_poll_mask(struct file *file)
|
||||
{
|
||||
return file->f_op->get_poll_head && file->f_op->poll_mask;
|
||||
}
|
||||
|
||||
static inline bool file_can_poll(struct file *file)
|
||||
{
|
||||
return file->f_op->poll || file_has_poll_mask(file);
|
||||
}
|
||||
|
||||
__poll_t vfs_poll(struct file *file, struct poll_table_struct *pt);
|
||||
|
||||
struct poll_table_entry {
|
||||
struct file *filp;
|
||||
__poll_t key;
|
||||
@@ -96,8 +108,6 @@ struct poll_wqueues {
|
||||
|
||||
extern void poll_initwait(struct poll_wqueues *pwq);
|
||||
extern void poll_freewait(struct poll_wqueues *pwq);
|
||||
extern int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
|
||||
ktime_t *expires, unsigned long slack);
|
||||
extern u64 select_estimate_accuracy(struct timespec64 *tv);
|
||||
|
||||
#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1)
|
||||
|
@@ -3250,8 +3250,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
|
||||
int *peeked, int *off, int *err);
|
||||
struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
|
||||
int *err);
|
||||
__poll_t datagram_poll(struct file *file, struct socket *sock,
|
||||
struct poll_table_struct *wait);
|
||||
__poll_t datagram_poll_mask(struct socket *sock, __poll_t events);
|
||||
int skb_copy_datagram_iter(const struct sk_buff *from, int offset,
|
||||
struct iov_iter *to, int size);
|
||||
static inline int skb_copy_datagram_msg(const struct sk_buff *from, int offset,
|
||||
|
@@ -290,6 +290,12 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id,
|
||||
long nr,
|
||||
struct io_event __user *events,
|
||||
struct timespec __user *timeout);
|
||||
asmlinkage long sys_io_pgetevents(aio_context_t ctx_id,
|
||||
long min_nr,
|
||||
long nr,
|
||||
struct io_event __user *events,
|
||||
struct timespec __user *timeout,
|
||||
const struct __aio_sigset *sig);
|
||||
|
||||
/* fs/xattr.c */
|
||||
asmlinkage long sys_setxattr(const char __user *path, const char __user *name,
|
||||
|
Reference in New Issue
Block a user