diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9682d52d1507..85e823adcd4a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2251,10 +2251,15 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
2251 | #endif | 2251 | #endif |
2252 | 2252 | ||
2253 | #ifdef CONFIG_BLOCK | 2253 | #ifdef CONFIG_BLOCK |
2254 | struct bio; | ||
2255 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | ||
2256 | loff_t file_offset); | ||
2257 | void dio_end_io(struct bio *bio, int error); | ||
2258 | |||
2254 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2259 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2255 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2260 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2256 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 2261 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
2257 | int lock_type); | 2262 | dio_submit_t submit_io, int lock_type); |
2258 | 2263 | ||
2259 | enum { | 2264 | enum { |
2260 | /* need locking between buffered and direct access */ | 2265 | /* need locking between buffered and direct access */ |
@@ -2270,7 +2275,7 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2270 | dio_iodone_t end_io) | 2275 | dio_iodone_t end_io) |
2271 | { | 2276 | { |
2272 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2277 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2273 | nr_segs, get_block, end_io, | 2278 | nr_segs, get_block, end_io, NULL, |
2274 | DIO_LOCKING | DIO_SKIP_HOLES); | 2279 | DIO_LOCKING | DIO_SKIP_HOLES); |
2275 | } | 2280 | } |
2276 | 2281 | ||
@@ -2280,7 +2285,7 @@ static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | |||
2280 | dio_iodone_t end_io) | 2285 | dio_iodone_t end_io) |
2281 | { | 2286 | { |
2282 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2287 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2283 | nr_segs, get_block, end_io, 0); | 2288 | nr_segs, get_block, end_io, NULL, 0); |
2284 | } | 2289 | } |
2285 | #endif | 2290 | #endif |
2286 | 2291 | ||