diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 36b7abefacbe..18cfbf76ec5b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1038,6 +1038,12 @@ struct super_block { | |||
1038 | * in /proc/mounts will be "type.subtype" | 1038 | * in /proc/mounts will be "type.subtype" |
1039 | */ | 1039 | */ |
1040 | char *s_subtype; | 1040 | char *s_subtype; |
1041 | |||
1042 | /* | ||
1043 | * Saved mount options for lazy filesystems using | ||
1044 | * generic_show_options() | ||
1045 | */ | ||
1046 | char *s_options; | ||
1041 | }; | 1047 | }; |
1042 | 1048 | ||
1043 | extern struct timespec current_fs_time(struct super_block *sb); | 1049 | extern struct timespec current_fs_time(struct super_block *sb); |
@@ -1618,7 +1624,6 @@ extern int register_chrdev(unsigned int, const char *, | |||
1618 | const struct file_operations *); | 1624 | const struct file_operations *); |
1619 | extern void unregister_chrdev(unsigned int, const char *); | 1625 | extern void unregister_chrdev(unsigned int, const char *); |
1620 | extern void unregister_chrdev_region(dev_t, unsigned); | 1626 | extern void unregister_chrdev_region(dev_t, unsigned); |
1621 | extern int chrdev_open(struct inode *, struct file *); | ||
1622 | extern void chrdev_show(struct seq_file *,off_t); | 1627 | extern void chrdev_show(struct seq_file *,off_t); |
1623 | 1628 | ||
1624 | /* fs/block_dev.c */ | 1629 | /* fs/block_dev.c */ |
@@ -1807,9 +1812,6 @@ extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | |||
1807 | unsigned long, loff_t, loff_t *, size_t, ssize_t); | 1812 | unsigned long, loff_t, loff_t *, size_t, ssize_t); |
1808 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); | 1813 | extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); |
1809 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); | 1814 | extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); |
1810 | extern void do_generic_mapping_read(struct address_space *mapping, | ||
1811 | struct file_ra_state *, struct file *, | ||
1812 | loff_t *, read_descriptor_t *, read_actor_t); | ||
1813 | extern int generic_segment_checks(const struct iovec *iov, | 1815 | extern int generic_segment_checks(const struct iovec *iov, |
1814 | unsigned long *nr_segs, size_t *count, int access_flags); | 1816 | unsigned long *nr_segs, size_t *count, int access_flags); |
1815 | 1817 | ||
@@ -1847,18 +1849,6 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
1847 | } | 1849 | } |
1848 | #endif | 1850 | #endif |
1849 | 1851 | ||
1850 | static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | ||
1851 | read_descriptor_t * desc, | ||
1852 | read_actor_t actor) | ||
1853 | { | ||
1854 | do_generic_mapping_read(filp->f_mapping, | ||
1855 | &filp->f_ra, | ||
1856 | filp, | ||
1857 | ppos, | ||
1858 | desc, | ||
1859 | actor); | ||
1860 | } | ||
1861 | |||
1862 | #ifdef CONFIG_BLOCK | 1852 | #ifdef CONFIG_BLOCK |
1863 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 1853 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
1864 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 1854 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
@@ -1985,6 +1975,9 @@ extern int __must_check inode_setattr(struct inode *, struct iattr *); | |||
1985 | 1975 | ||
1986 | extern void file_update_time(struct file *file); | 1976 | extern void file_update_time(struct file *file); |
1987 | 1977 | ||
1978 | extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); | ||
1979 | extern void save_mount_options(struct super_block *sb, char *options); | ||
1980 | |||
1988 | static inline ino_t parent_ino(struct dentry *dentry) | 1981 | static inline ino_t parent_ino(struct dentry *dentry) |
1989 | { | 1982 | { |
1990 | ino_t res; | 1983 | ino_t res; |
@@ -2056,7 +2049,7 @@ static int __fops ## _open(struct inode *inode, struct file *file) \ | |||
2056 | static struct file_operations __fops = { \ | 2049 | static struct file_operations __fops = { \ |
2057 | .owner = THIS_MODULE, \ | 2050 | .owner = THIS_MODULE, \ |
2058 | .open = __fops ## _open, \ | 2051 | .open = __fops ## _open, \ |
2059 | .release = simple_attr_close, \ | 2052 | .release = simple_attr_release, \ |
2060 | .read = simple_attr_read, \ | 2053 | .read = simple_attr_read, \ |
2061 | .write = simple_attr_write, \ | 2054 | .write = simple_attr_write, \ |
2062 | }; | 2055 | }; |
@@ -2068,9 +2061,9 @@ __simple_attr_check_format(const char *fmt, ...) | |||
2068 | } | 2061 | } |
2069 | 2062 | ||
2070 | int simple_attr_open(struct inode *inode, struct file *file, | 2063 | int simple_attr_open(struct inode *inode, struct file *file, |
2071 | u64 (*get)(void *), void (*set)(void *, u64), | 2064 | int (*get)(void *, u64 *), int (*set)(void *, u64), |
2072 | const char *fmt); | 2065 | const char *fmt); |
2073 | int simple_attr_close(struct inode *inode, struct file *file); | 2066 | int simple_attr_release(struct inode *inode, struct file *file); |
2074 | ssize_t simple_attr_read(struct file *file, char __user *buf, | 2067 | ssize_t simple_attr_read(struct file *file, char __user *buf, |
2075 | size_t len, loff_t *ppos); | 2068 | size_t len, loff_t *ppos); |
2076 | ssize_t simple_attr_write(struct file *file, const char __user *buf, | 2069 | ssize_t simple_attr_write(struct file *file, const char __user *buf, |