aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h23
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
984struct 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 *);
1873extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1885extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
1874 struct vfsmount *); 1886 struct vfsmount *);
1875extern int vfs_statfs(struct path *, struct kstatfs *); 1887extern int vfs_statfs(struct path *, struct kstatfs *);
1888extern int user_statfs(const char __user *, struct kstatfs *);
1889extern int fd_statfs(int, struct kstatfs *);
1876extern int statfs_by_dentry(struct dentry *, struct kstatfs *); 1890extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
1877extern int freeze_super(struct super_block *super); 1891extern int freeze_super(struct super_block *super);
1878extern int thaw_super(struct super_block *super); 1892extern int thaw_super(struct super_block *super);
@@ -1989,6 +2003,8 @@ extern int do_fallocate(struct file *file, int mode, loff_t offset,
1989extern long do_sys_open(int dfd, const char __user *filename, int flags, 2003extern long do_sys_open(int dfd, const char __user *filename, int flags,
1990 int mode); 2004 int mode);
1991extern struct file *filp_open(const char *, int, int); 2005extern struct file *filp_open(const char *, int, int);
2006extern struct file *file_open_root(struct dentry *, struct vfsmount *,
2007 const char *, int);
1992extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, 2008extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
1993 const struct cred *); 2009 const struct cred *);
1994extern int filp_close(struct file *, fl_owner_t id); 2010extern 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);
2140extern int revalidate_disk(struct gendisk *); 2156extern int revalidate_disk(struct gendisk *);
2141extern int check_disk_change(struct block_device *); 2157extern int check_disk_change(struct block_device *);
2142extern int __invalidate_device(struct block_device *); 2158extern int __invalidate_device(struct block_device *, bool);
2143extern int invalidate_partition(struct gendisk *, int); 2159extern int invalidate_partition(struct gendisk *, int);
2144#endif 2160#endif
2145unsigned long invalidate_mapping_pages(struct address_space *mapping, 2161unsigned long invalidate_mapping_pages(struct address_space *mapping,
@@ -2204,10 +2220,6 @@ extern struct file *create_read_pipe(struct file *f, int flags);
2204extern struct file *create_write_pipe(int flags); 2220extern struct file *create_write_pipe(int flags);
2205extern void free_write_pipe(struct file *); 2221extern void free_write_pipe(struct file *);
2206 2222
2207extern struct file *do_filp_open(int dfd, const char *pathname,
2208 int open_flag, int mode, int acc_mode);
2209extern int may_open(struct path *, int, int);
2210
2211extern int kernel_read(struct file *, loff_t, char *, unsigned long); 2223extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2212extern struct file * open_exec(const char *); 2224extern 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
2226extern int inode_init_always(struct super_block *, struct inode *); 2238extern int inode_init_always(struct super_block *, struct inode *);
2227extern void inode_init_once(struct inode *); 2239extern void inode_init_once(struct inode *);
2240extern void address_space_init_once(struct address_space *mapping);
2228extern void ihold(struct inode * inode); 2241extern void ihold(struct inode * inode);
2229extern void iput(struct inode *); 2242extern void iput(struct inode *);
2230extern struct inode * igrab(struct inode *); 2243extern struct inode * igrab(struct inode *);