diff options
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index bd3215940c37..13df14e2c42e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -102,6 +102,9 @@ struct inodes_stat_t { | |||
| 102 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | 102 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ |
| 103 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | 103 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) |
| 104 | 104 | ||
| 105 | /* File is opened with O_PATH; almost nothing can be done with it */ | ||
| 106 | #define FMODE_PATH ((__force fmode_t)0x4000) | ||
| 107 | |||
| 105 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 108 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
| 106 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 109 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
| 107 | 110 | ||
| @@ -649,6 +652,7 @@ struct address_space { | |||
| 649 | spinlock_t private_lock; /* for use by the address_space */ | 652 | spinlock_t private_lock; /* for use by the address_space */ |
| 650 | struct list_head private_list; /* ditto */ | 653 | struct list_head private_list; /* ditto */ |
| 651 | struct address_space *assoc_mapping; /* ditto */ | 654 | struct address_space *assoc_mapping; /* ditto */ |
| 655 | struct mutex unmap_mutex; /* to protect unmapping */ | ||
| 652 | } __attribute__((aligned(sizeof(long)))); | 656 | } __attribute__((aligned(sizeof(long)))); |
| 653 | /* | 657 | /* |
| 654 | * On most architectures that alignment is already the case; but | 658 | * On most architectures that alignment is already the case; but |
| @@ -977,6 +981,13 @@ struct file { | |||
| 977 | #endif | 981 | #endif |
| 978 | }; | 982 | }; |
| 979 | 983 | ||
| 984 | struct file_handle { | ||
| 985 | __u32 handle_bytes; | ||
| 986 | int handle_type; | ||
| 987 | /* file identifier */ | ||
| 988 | unsigned char f_handle[0]; | ||
| 989 | }; | ||
| 990 | |||
| 980 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 991 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
| 981 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 992 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
| 982 | #define file_count(x) atomic_long_read(&(x)->f_count) | 993 | #define file_count(x) atomic_long_read(&(x)->f_count) |
| @@ -1400,6 +1411,7 @@ struct super_block { | |||
| 1400 | wait_queue_head_t s_wait_unfrozen; | 1411 | wait_queue_head_t s_wait_unfrozen; |
| 1401 | 1412 | ||
| 1402 | char s_id[32]; /* Informational name */ | 1413 | char s_id[32]; /* Informational name */ |
| 1414 | u8 s_uuid[16]; /* UUID */ | ||
| 1403 | 1415 | ||
| 1404 | void *s_fs_info; /* Filesystem private info */ | 1416 | void *s_fs_info; /* Filesystem private info */ |
| 1405 | fmode_t s_mode; | 1417 | fmode_t s_mode; |
| @@ -1873,6 +1885,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
| 1873 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 1885 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
| 1874 | struct vfsmount *); | 1886 | struct vfsmount *); |
| 1875 | extern int vfs_statfs(struct path *, struct kstatfs *); | 1887 | extern int vfs_statfs(struct path *, struct kstatfs *); |
| 1888 | extern int user_statfs(const char __user *, struct kstatfs *); | ||
| 1889 | extern int fd_statfs(int, struct kstatfs *); | ||
| 1876 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); | 1890 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); |
| 1877 | extern int freeze_super(struct super_block *super); | 1891 | extern int freeze_super(struct super_block *super); |
| 1878 | extern int thaw_super(struct super_block *super); | 1892 | extern int thaw_super(struct super_block *super); |
| @@ -1989,6 +2003,8 @@ extern int do_fallocate(struct file *file, int mode, loff_t offset, | |||
| 1989 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 2003 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
| 1990 | int mode); | 2004 | int mode); |
| 1991 | extern struct file *filp_open(const char *, int, int); | 2005 | extern struct file *filp_open(const char *, int, int); |
| 2006 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | ||
| 2007 | const char *, int); | ||
| 1992 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2008 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, |
| 1993 | const struct cred *); | 2009 | const struct cred *); |
| 1994 | extern int filp_close(struct file *, fl_owner_t id); | 2010 | extern int filp_close(struct file *, fl_owner_t id); |
| @@ -2139,7 +2155,7 @@ extern void check_disk_size_change(struct gendisk *disk, | |||
| 2139 | struct block_device *bdev); | 2155 | struct block_device *bdev); |
| 2140 | extern int revalidate_disk(struct gendisk *); | 2156 | extern int revalidate_disk(struct gendisk *); |
| 2141 | extern int check_disk_change(struct block_device *); | 2157 | extern int check_disk_change(struct block_device *); |
| 2142 | extern int __invalidate_device(struct block_device *); | 2158 | extern int __invalidate_device(struct block_device *, bool); |
| 2143 | extern int invalidate_partition(struct gendisk *, int); | 2159 | extern int invalidate_partition(struct gendisk *, int); |
| 2144 | #endif | 2160 | #endif |
| 2145 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2161 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
| @@ -2204,10 +2220,6 @@ extern struct file *create_read_pipe(struct file *f, int flags); | |||
| 2204 | extern struct file *create_write_pipe(int flags); | 2220 | extern struct file *create_write_pipe(int flags); |
| 2205 | extern void free_write_pipe(struct file *); | 2221 | extern void free_write_pipe(struct file *); |
| 2206 | 2222 | ||
| 2207 | extern struct file *do_filp_open(int dfd, const char *pathname, | ||
| 2208 | int open_flag, int mode, int acc_mode); | ||
| 2209 | extern int may_open(struct path *, int, int); | ||
| 2210 | |||
| 2211 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2223 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
| 2212 | extern struct file * open_exec(const char *); | 2224 | extern struct file * open_exec(const char *); |
| 2213 | 2225 | ||
| @@ -2225,6 +2237,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | |||
| 2225 | 2237 | ||
| 2226 | extern int inode_init_always(struct super_block *, struct inode *); | 2238 | extern int inode_init_always(struct super_block *, struct inode *); |
| 2227 | extern void inode_init_once(struct inode *); | 2239 | extern void inode_init_once(struct inode *); |
| 2240 | extern void address_space_init_once(struct address_space *mapping); | ||
| 2228 | extern void ihold(struct inode * inode); | 2241 | extern void ihold(struct inode * inode); |
| 2229 | extern void iput(struct inode *); | 2242 | extern void iput(struct inode *); |
| 2230 | extern struct inode * igrab(struct inode *); | 2243 | extern struct inode * igrab(struct inode *); |
