diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:41 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:41 -0400 |
commit | c0fec3a98bd6c4d992f191ee1aa0b3599213f3d4 (patch) | |
tree | 24b4533146ce10bcf4af6fca0971311ece523d58 /include/linux/fs.h | |
parent | c1b8940b42bb6487b10f2267a96b486276ce9ff7 (diff) | |
parent | e2e40f2c1ed433c5e224525c8c862fd32e5d3df2 (diff) |
Merge branch 'iocb' into for-next
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index d70e333988f1..dfbd88a7f769 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -314,6 +314,28 @@ struct page; struct address_space; struct writeback_control; +#define IOCB_EVENTFD (1 << 0) + +struct kiocb { + struct file *ki_filp; + loff_t ki_pos; + void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); + void *private; + int ki_flags; +}; + +static inline bool is_sync_kiocb(struct kiocb *kiocb) +{ + return kiocb->ki_complete == NULL; +} + +static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) +{ + *kiocb = (struct kiocb) { + .ki_filp = filp, + }; +} + /* * "descriptor" for what we're up to with a read. * This allows us to use the same read code yet |