diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 517bf4966bf5..3ae8e37bdfc8 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -220,6 +220,7 @@ extern int dir_notify_enable; | |||
220 | 220 | ||
221 | struct iovec; | 221 | struct iovec; |
222 | struct nameidata; | 222 | struct nameidata; |
223 | struct kiocb; | ||
223 | struct pipe_inode_info; | 224 | struct pipe_inode_info; |
224 | struct poll_table_struct; | 225 | struct poll_table_struct; |
225 | struct kstatfs; | 226 | struct kstatfs; |
@@ -240,7 +241,7 @@ typedef int (get_block_t)(struct inode *inode, sector_t iblock, | |||
240 | typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, | 241 | typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, |
241 | unsigned long max_blocks, | 242 | unsigned long max_blocks, |
242 | struct buffer_head *bh_result, int create); | 243 | struct buffer_head *bh_result, int create); |
243 | typedef void (dio_iodone_t)(struct inode *inode, loff_t offset, | 244 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, |
244 | ssize_t bytes, void *private); | 245 | ssize_t bytes, void *private); |
245 | 246 | ||
246 | /* | 247 | /* |
@@ -302,7 +303,6 @@ struct iattr { | |||
302 | struct page; | 303 | struct page; |
303 | struct address_space; | 304 | struct address_space; |
304 | struct writeback_control; | 305 | struct writeback_control; |
305 | struct kiocb; | ||
306 | 306 | ||
307 | struct address_space_operations { | 307 | struct address_space_operations { |
308 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 308 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
@@ -330,6 +330,8 @@ struct address_space_operations { | |||
330 | int (*releasepage) (struct page *, int); | 330 | int (*releasepage) (struct page *, int); |
331 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 331 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
332 | loff_t offset, unsigned long nr_segs); | 332 | loff_t offset, unsigned long nr_segs); |
333 | struct page* (*get_xip_page)(struct address_space *, sector_t, | ||
334 | int); | ||
333 | }; | 335 | }; |
334 | 336 | ||
335 | struct backing_dev_info; | 337 | struct backing_dev_info; |
@@ -885,6 +887,7 @@ struct block_device_operations { | |||
885 | int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); | 887 | int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); |
886 | long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); | 888 | long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); |
887 | long (*compat_ioctl) (struct file *, unsigned, unsigned long); | 889 | long (*compat_ioctl) (struct file *, unsigned, unsigned long); |
890 | int (*direct_access) (struct block_device *, sector_t, unsigned long *); | ||
888 | int (*media_changed) (struct gendisk *); | 891 | int (*media_changed) (struct gendisk *); |
889 | int (*revalidate_disk) (struct gendisk *); | 892 | int (*revalidate_disk) (struct gendisk *); |
890 | struct module *owner; | 893 | struct module *owner; |
@@ -1496,6 +1499,23 @@ extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); | |||
1496 | extern int generic_file_open(struct inode * inode, struct file * filp); | 1499 | extern int generic_file_open(struct inode * inode, struct file * filp); |
1497 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 1500 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
1498 | 1501 | ||
1502 | #ifdef CONFIG_FS_XIP | ||
1503 | extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len, | ||
1504 | loff_t *ppos); | ||
1505 | extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos, | ||
1506 | size_t count, read_actor_t actor, | ||
1507 | void *target); | ||
1508 | extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma); | ||
1509 | extern ssize_t xip_file_write(struct file *filp, const char __user *buf, | ||
1510 | size_t len, loff_t *ppos); | ||
1511 | extern int xip_truncate_page(struct address_space *mapping, loff_t from); | ||
1512 | #else | ||
1513 | static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | ||
1514 | { | ||
1515 | return 0; | ||
1516 | } | ||
1517 | #endif | ||
1518 | |||
1499 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | 1519 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, |
1500 | read_descriptor_t * desc, | 1520 | read_descriptor_t * desc, |
1501 | read_actor_t actor) | 1521 | read_actor_t actor) |