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.h19
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
983struct 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 *);
1873extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1884extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
1874 struct vfsmount *); 1885 struct vfsmount *);
1875extern int vfs_statfs(struct path *, struct kstatfs *); 1886extern int vfs_statfs(struct path *, struct kstatfs *);
1887extern int user_statfs(const char __user *, struct kstatfs *);
1888extern int fd_statfs(int, struct kstatfs *);
1876extern int statfs_by_dentry(struct dentry *, struct kstatfs *); 1889extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
1877extern int freeze_super(struct super_block *super); 1890extern int freeze_super(struct super_block *super);
1878extern int thaw_super(struct super_block *super); 1891extern int thaw_super(struct super_block *super);
@@ -1989,6 +2002,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, 2002extern long do_sys_open(int dfd, const char __user *filename, int flags,
1990 int mode); 2003 int mode);
1991extern struct file *filp_open(const char *, int, int); 2004extern struct file *filp_open(const char *, int, int);
2005extern struct file *file_open_root(struct dentry *, struct vfsmount *,
2006 const char *, int);
1992extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, 2007extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
1993 const struct cred *); 2008 const struct cred *);
1994extern int filp_close(struct file *, fl_owner_t id); 2009extern int filp_close(struct file *, fl_owner_t id);
@@ -2224,10 +2239,6 @@ extern struct file *create_read_pipe(struct file *f, int flags);
2224extern struct file *create_write_pipe(int flags); 2239extern struct file *create_write_pipe(int flags);
2225extern void free_write_pipe(struct file *); 2240extern void free_write_pipe(struct file *);
2226 2241
2227extern struct file *do_filp_open(int dfd, const char *pathname,
2228 int open_flag, int mode, int acc_mode);
2229extern int may_open(struct path *, int, int);
2230
2231extern int kernel_read(struct file *, loff_t, char *, unsigned long); 2242extern int kernel_read(struct file *, loff_t, char *, unsigned long);
2232extern struct file * open_exec(const char *); 2243extern struct file * open_exec(const char *);
2233 2244