blob: 9d8aabecfe2d40634352ee3729b26da4c760a670 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef __LINUX__AIO_H
3#define __LINUX__AIO_H
4
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/aio_abi.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Linus Torvalds1da177e2005-04-16 15:20:36 -07007struct kioctx;
Kent Overstreet0460fef2013-05-07 16:18:49 -07008struct kiocb;
Christoph Hellwige2e40f22015-02-22 08:58:50 -08009struct mm_struct;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Kent Overstreet8a660892013-05-07 16:19:10 -070011#define KIOCB_KEY 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Kent Overstreetbec68faa2013-05-13 14:45:08 -070013typedef int (kiocb_cancel_fn)(struct kiocb *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Linus Torvalds1da177e2005-04-16 15:20:36 -070015/* prototypes */
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070016#ifdef CONFIG_AIO
Harvey Harrisonb3c97522008-02-13 15:03:15 -080017extern void exit_aio(struct mm_struct *mm);
Kent Overstreet0460fef2013-05-07 16:18:49 -070018void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070019#else
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070020static inline void exit_aio(struct mm_struct *mm) { }
Kent Overstreet0460fef2013-05-07 16:18:49 -070021static inline void kiocb_set_cancel_fn(struct kiocb *req,
22 kiocb_cancel_fn *cancel) { }
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070023#endif /* CONFIG_AIO */
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025/* for sysctl: */
Zach Brownd55b5fd2005-11-07 00:59:31 -080026extern unsigned long aio_nr;
27extern unsigned long aio_max_nr;
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
29#endif /* __LINUX__AIO_H */