diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index f91affb7d530..b347b2d5666f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2269,16 +2269,6 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
2269 | struct bio; | 2269 | struct bio; |
2270 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | 2270 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, |
2271 | loff_t file_offset); | 2271 | loff_t file_offset); |
2272 | void dio_end_io(struct bio *bio, int error); | ||
2273 | |||
2274 | ssize_t __blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, struct inode *inode, | ||
2275 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | ||
2276 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | ||
2277 | dio_submit_t submit_io, int lock_type); | ||
2278 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | ||
2279 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | ||
2280 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | ||
2281 | dio_submit_t submit_io, int lock_type); | ||
2282 | 2272 | ||
2283 | enum { | 2273 | enum { |
2284 | /* need locking between buffered and direct access */ | 2274 | /* need locking between buffered and direct access */ |
@@ -2288,24 +2278,13 @@ enum { | |||
2288 | DIO_SKIP_HOLES = 0x02, | 2278 | DIO_SKIP_HOLES = 0x02, |
2289 | }; | 2279 | }; |
2290 | 2280 | ||
2291 | static inline ssize_t blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, | 2281 | void dio_end_io(struct bio *bio, int error); |
2292 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 2282 | |
2293 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | 2283 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2294 | dio_iodone_t end_io) | 2284 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2295 | { | 2285 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
2296 | return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, | 2286 | dio_submit_t submit_io, int flags); |
2297 | nr_segs, get_block, end_io, NULL, | ||
2298 | DIO_LOCKING | DIO_SKIP_HOLES); | ||
2299 | } | ||
2300 | 2287 | ||
2301 | static inline ssize_t blockdev_direct_IO_no_locking_newtrunc(int rw, struct kiocb *iocb, | ||
2302 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | ||
2303 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | ||
2304 | dio_iodone_t end_io) | ||
2305 | { | ||
2306 | return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, | ||
2307 | nr_segs, get_block, end_io, NULL, 0); | ||
2308 | } | ||
2309 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | 2288 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, |
2310 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 2289 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
2311 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | 2290 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
@@ -2315,15 +2294,6 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2315 | nr_segs, get_block, end_io, NULL, | 2294 | nr_segs, get_block, end_io, NULL, |
2316 | DIO_LOCKING | DIO_SKIP_HOLES); | 2295 | DIO_LOCKING | DIO_SKIP_HOLES); |
2317 | } | 2296 | } |
2318 | |||
2319 | static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | ||
2320 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | ||
2321 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | ||
2322 | dio_iodone_t end_io) | ||
2323 | { | ||
2324 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | ||
2325 | nr_segs, get_block, end_io, NULL, 0); | ||
2326 | } | ||
2327 | #endif | 2297 | #endif |
2328 | 2298 | ||
2329 | extern const struct file_operations generic_ro_fops; | 2299 | extern const struct file_operations generic_ro_fops; |