aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-09 00:00:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-09 00:01:38 -0400
commit237dae889051ed4ebf438b08ca6c0e7c54b97774 (patch)
tree0cbd9882d28f19875f5c1daf1698edaac985de0f /include/linux/fs.h
parent7abccdba25be45630eede85053496f1f48d36ec8 (diff)
parente2e40f2c1ed433c5e224525c8c862fd32e5d3df2 (diff)
Merge branch 'iocb' into for-davem
trivial conflict in net/socket.c and non-trivial one in crypto - that one had evaded aio_complete() removal. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f4131e8ead74..fdce1ddf230c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -314,6 +314,28 @@ struct page;
314struct address_space; 314struct address_space;
315struct writeback_control; 315struct writeback_control;
316 316
317#define IOCB_EVENTFD (1 << 0)
318
319struct kiocb {
320 struct file *ki_filp;
321 loff_t ki_pos;
322 void (*ki_complete)(struct kiocb *iocb, long ret, long ret2);
323 void *private;
324 int ki_flags;
325};
326
327static inline bool is_sync_kiocb(struct kiocb *kiocb)
328{
329 return kiocb->ki_complete == NULL;
330}
331
332static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
333{
334 *kiocb = (struct kiocb) {
335 .ki_filp = filp,
336 };
337}
338
317/* 339/*
318 * "descriptor" for what we're up to with a read. 340 * "descriptor" for what we're up to with a read.
319 * This allows us to use the same read code yet 341 * This allows us to use the same read code yet