diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index af5bd7a629e..2f5a71d6d76 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 | ||
@@ -977,6 +980,13 @@ struct file { | |||
977 | #endif | 980 | #endif |
978 | }; | 981 | }; |
979 | 982 | ||
983 | struct file_handle { | ||
984 | __u32 handle_bytes; | ||
985 | int handle_type; | ||
986 | /* file identifier */ | ||
987 | unsigned char f_handle[0]; | ||
988 | }; | ||
989 | |||
980 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 990 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
981 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 991 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
982 | #define file_count(x) atomic_long_read(&(x)->f_count) | 992 | #define file_count(x) atomic_long_read(&(x)->f_count) |
@@ -1400,6 +1410,7 @@ struct super_block { | |||
1400 | wait_queue_head_t s_wait_unfrozen; | 1410 | wait_queue_head_t s_wait_unfrozen; |
1401 | 1411 | ||
1402 | char s_id[32]; /* Informational name */ | 1412 | char s_id[32]; /* Informational name */ |
1413 | u8 s_uuid[16]; /* UUID */ | ||
1403 | 1414 | ||
1404 | void *s_fs_info; /* Filesystem private info */ | 1415 | void *s_fs_info; /* Filesystem private info */ |
1405 | fmode_t s_mode; | 1416 | fmode_t s_mode; |
@@ -1873,6 +1884,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
1873 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 1884 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
1874 | struct vfsmount *); | 1885 | struct vfsmount *); |
1875 | extern int vfs_statfs(struct path *, struct kstatfs *); | 1886 | extern int vfs_statfs(struct path *, struct kstatfs *); |
1887 | extern int user_statfs(const char __user *, struct kstatfs *); | ||
1888 | extern int fd_statfs(int, struct kstatfs *); | ||
1876 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); | 1889 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); |
1877 | extern int freeze_super(struct super_block *super); | 1890 | extern int freeze_super(struct super_block *super); |
1878 | extern int thaw_super(struct super_block *super); | 1891 | extern int thaw_super(struct super_block *super); |
@@ -1989,6 +2002,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, | 2002 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
1990 | int mode); | 2003 | int mode); |
1991 | extern struct file *filp_open(const char *, int, int); | 2004 | extern struct file *filp_open(const char *, int, int); |
2005 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | ||
2006 | const char *, int); | ||
1992 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2007 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, |
1993 | const struct cred *); | 2008 | const struct cred *); |
1994 | extern int filp_close(struct file *, fl_owner_t id); | 2009 | extern int filp_close(struct file *, fl_owner_t id); |
@@ -2224,10 +2239,6 @@ extern struct file *create_read_pipe(struct file *f, int flags); | |||
2224 | extern struct file *create_write_pipe(int flags); | 2239 | extern struct file *create_write_pipe(int flags); |
2225 | extern void free_write_pipe(struct file *); | 2240 | extern void free_write_pipe(struct file *); |
2226 | 2241 | ||
2227 | extern struct file *do_filp_open(int dfd, const char *pathname, | ||
2228 | int open_flag, int mode, int acc_mode); | ||
2229 | extern int may_open(struct path *, int, int); | ||
2230 | |||
2231 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2242 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2232 | extern struct file * open_exec(const char *); | 2243 | extern struct file * open_exec(const char *); |
2233 | 2244 | ||