diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 18:48:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 18:48:13 -0400 |
commit | 422e6c4bc4b48c15b3cb57a1ca71431abfc57e54 (patch) | |
tree | 81ceb21f84a79e796ee33b5d17e17406f096abcb /include/linux/fs.h | |
parent | c83ce989cb5ff86575821992ea82c4df5c388ebc (diff) | |
parent | 574197e0de46a8a4db5c54ef7b65e43ffa8873a7 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (57 commits)
tidy the trailing symlinks traversal up
Turn resolution of trailing symlinks iterative everywhere
simplify link_path_walk() tail
Make trailing symlink resolution in path_lookupat() iterative
update nd->inode in __do_follow_link() instead of after do_follow_link()
pull handling of one pathname component into a helper
fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCH
Allow passing O_PATH descriptors via SCM_RIGHTS datagrams
readlinkat(), fchownat() and fstatat() with empty relative pathnames
Allow O_PATH for symlinks
New kind of open files - "location only".
ext4: Copy fs UUID to superblock
ext3: Copy fs UUID to superblock.
vfs: Export file system uuid via /proc/<pid>/mountinfo
unistd.h: Add new syscalls numbers to asm-generic
x86: Add new syscalls for x86_64
x86: Add new syscalls for x86_32
fs: Remove i_nlink check from file system link callback
fs: Don't allow to create hardlink for deleted file
vfs: Add open by file handle support
...
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 e38b50a4b9d2..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 | ||
@@ -978,6 +981,13 @@ struct file { | |||
978 | #endif | 981 | #endif |
979 | }; | 982 | }; |
980 | 983 | ||
984 | struct file_handle { | ||
985 | __u32 handle_bytes; | ||
986 | int handle_type; | ||
987 | /* file identifier */ | ||
988 | unsigned char f_handle[0]; | ||
989 | }; | ||
990 | |||
981 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 991 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
982 | #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) |
983 | #define file_count(x) atomic_long_read(&(x)->f_count) | 993 | #define file_count(x) atomic_long_read(&(x)->f_count) |
@@ -1401,6 +1411,7 @@ struct super_block { | |||
1401 | wait_queue_head_t s_wait_unfrozen; | 1411 | wait_queue_head_t s_wait_unfrozen; |
1402 | 1412 | ||
1403 | char s_id[32]; /* Informational name */ | 1413 | char s_id[32]; /* Informational name */ |
1414 | u8 s_uuid[16]; /* UUID */ | ||
1404 | 1415 | ||
1405 | void *s_fs_info; /* Filesystem private info */ | 1416 | void *s_fs_info; /* Filesystem private info */ |
1406 | fmode_t s_mode; | 1417 | fmode_t s_mode; |
@@ -1874,6 +1885,8 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
1874 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 1885 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
1875 | struct vfsmount *); | 1886 | struct vfsmount *); |
1876 | 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 *); | ||
1877 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); | 1890 | extern int statfs_by_dentry(struct dentry *, struct kstatfs *); |
1878 | extern int freeze_super(struct super_block *super); | 1891 | extern int freeze_super(struct super_block *super); |
1879 | extern int thaw_super(struct super_block *super); | 1892 | extern int thaw_super(struct super_block *super); |
@@ -1990,6 +2003,8 @@ extern int do_fallocate(struct file *file, int mode, loff_t offset, | |||
1990 | 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, |
1991 | int mode); | 2004 | int mode); |
1992 | 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); | ||
1993 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2008 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, |
1994 | const struct cred *); | 2009 | const struct cred *); |
1995 | extern int filp_close(struct file *, fl_owner_t id); | 2010 | extern int filp_close(struct file *, fl_owner_t id); |
@@ -2205,10 +2220,6 @@ extern struct file *create_read_pipe(struct file *f, int flags); | |||
2205 | extern struct file *create_write_pipe(int flags); | 2220 | extern struct file *create_write_pipe(int flags); |
2206 | extern void free_write_pipe(struct file *); | 2221 | extern void free_write_pipe(struct file *); |
2207 | 2222 | ||
2208 | extern struct file *do_filp_open(int dfd, const char *pathname, | ||
2209 | int open_flag, int mode, int acc_mode); | ||
2210 | extern int may_open(struct path *, int, int); | ||
2211 | |||
2212 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); | 2223 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2213 | extern struct file * open_exec(const char *); | 2224 | extern struct file * open_exec(const char *); |
2214 | 2225 | ||