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 44f35aea2f1f..10704f0086c8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2250,10 +2250,15 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
2250 | #endif | 2250 | #endif |
2251 | 2251 | ||
2252 | #ifdef CONFIG_BLOCK | 2252 | #ifdef CONFIG_BLOCK |
2253 | struct bio; | ||
2254 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | ||
2255 | loff_t file_offset); | ||
2256 | void dio_end_io(struct bio *bio, int error); | ||
2257 | |||
2253 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2258 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2254 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2259 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2255 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 2260 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
2256 | int lock_type); | 2261 | dio_submit_t submit_io, int lock_type); |
2257 | 2262 | ||
2258 | enum { | 2263 | enum { |
2259 | /* need locking between buffered and direct access */ | 2264 | /* need locking between buffered and direct access */ |
@@ -2269,7 +2274,7 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2269 | dio_iodone_t end_io) | 2274 | dio_iodone_t end_io) |
2270 | { | 2275 | { |
2271 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2276 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2272 | nr_segs, get_block, end_io, | 2277 | nr_segs, get_block, end_io, NULL, |
2273 | DIO_LOCKING | DIO_SKIP_HOLES); | 2278 | DIO_LOCKING | DIO_SKIP_HOLES); |
2274 | } | 2279 | } |
2275 | 2280 | ||
@@ -2279,7 +2284,7 @@ static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | |||
2279 | dio_iodone_t end_io) | 2284 | dio_iodone_t end_io) |
2280 | { | 2285 | { |
2281 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2286 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2282 | nr_segs, get_block, end_io, 0); | 2287 | nr_segs, get_block, end_io, NULL, 0); |
2283 | } | 2288 | } |
2284 | #endif | 2289 | #endif |
2285 | 2290 | ||