blob: b83e68dd006f1ea8aa4f740163c903bc05db2d1c [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 Overstreetbec68faa2013-05-13 14:45:08 -070011typedef int (kiocb_cancel_fn)(struct kiocb *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
Linus Torvalds1da177e2005-04-16 15:20:36 -070013/* prototypes */
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070014#ifdef CONFIG_AIO
Harvey Harrisonb3c97522008-02-13 15:03:15 -080015extern void exit_aio(struct mm_struct *mm);
Kent Overstreet0460fef2013-05-07 16:18:49 -070016void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070017#else
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070018static inline void exit_aio(struct mm_struct *mm) { }
Kent Overstreet0460fef2013-05-07 16:18:49 -070019static inline void kiocb_set_cancel_fn(struct kiocb *req,
20 kiocb_cancel_fn *cancel) { }
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070021#endif /* CONFIG_AIO */
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
Linus Torvalds1da177e2005-04-16 15:20:36 -070023/* for sysctl: */
Zach Brownd55b5fd2005-11-07 00:59:31 -080024extern unsigned long aio_nr;
25extern unsigned long aio_max_nr;
Linus Torvalds1da177e2005-04-16 15:20:36 -070026
27#endif /* __LINUX__AIO_H */