diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 53d2edb709b3..8252b045e624 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -60,6 +60,8 @@ extern int dir_notify_enable; | |||
60 | #define MAY_WRITE 2 | 60 | #define MAY_WRITE 2 |
61 | #define MAY_READ 4 | 61 | #define MAY_READ 4 |
62 | #define MAY_APPEND 8 | 62 | #define MAY_APPEND 8 |
63 | #define MAY_ACCESS 16 | ||
64 | #define MAY_OPEN 32 | ||
63 | 65 | ||
64 | #define FMODE_READ 1 | 66 | #define FMODE_READ 1 |
65 | #define FMODE_WRITE 2 | 67 | #define FMODE_WRITE 2 |
@@ -277,7 +279,7 @@ extern int dir_notify_enable; | |||
277 | #include <linux/types.h> | 279 | #include <linux/types.h> |
278 | #include <linux/kdev_t.h> | 280 | #include <linux/kdev_t.h> |
279 | #include <linux/dcache.h> | 281 | #include <linux/dcache.h> |
280 | #include <linux/namei.h> | 282 | #include <linux/path.h> |
281 | #include <linux/stat.h> | 283 | #include <linux/stat.h> |
282 | #include <linux/cache.h> | 284 | #include <linux/cache.h> |
283 | #include <linux/kobject.h> | 285 | #include <linux/kobject.h> |
@@ -318,22 +320,23 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
318 | * Attribute flags. These should be or-ed together to figure out what | 320 | * Attribute flags. These should be or-ed together to figure out what |
319 | * has been changed! | 321 | * has been changed! |
320 | */ | 322 | */ |
321 | #define ATTR_MODE 1 | 323 | #define ATTR_MODE (1 << 0) |
322 | #define ATTR_UID 2 | 324 | #define ATTR_UID (1 << 1) |
323 | #define ATTR_GID 4 | 325 | #define ATTR_GID (1 << 2) |
324 | #define ATTR_SIZE 8 | 326 | #define ATTR_SIZE (1 << 3) |
325 | #define ATTR_ATIME 16 | 327 | #define ATTR_ATIME (1 << 4) |
326 | #define ATTR_MTIME 32 | 328 | #define ATTR_MTIME (1 << 5) |
327 | #define ATTR_CTIME 64 | 329 | #define ATTR_CTIME (1 << 6) |
328 | #define ATTR_ATIME_SET 128 | 330 | #define ATTR_ATIME_SET (1 << 7) |
329 | #define ATTR_MTIME_SET 256 | 331 | #define ATTR_MTIME_SET (1 << 8) |
330 | #define ATTR_FORCE 512 /* Not a change, but a change it */ | 332 | #define ATTR_FORCE (1 << 9) /* Not a change, but a change it */ |
331 | #define ATTR_ATTR_FLAG 1024 | 333 | #define ATTR_ATTR_FLAG (1 << 10) |
332 | #define ATTR_KILL_SUID 2048 | 334 | #define ATTR_KILL_SUID (1 << 11) |
333 | #define ATTR_KILL_SGID 4096 | 335 | #define ATTR_KILL_SGID (1 << 12) |
334 | #define ATTR_FILE 8192 | 336 | #define ATTR_FILE (1 << 13) |
335 | #define ATTR_KILL_PRIV 16384 | 337 | #define ATTR_KILL_PRIV (1 << 14) |
336 | #define ATTR_OPEN 32768 /* Truncating from open(O_TRUNC) */ | 338 | #define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */ |
339 | #define ATTR_TIMES_SET (1 << 16) | ||
337 | 340 | ||
338 | /* | 341 | /* |
339 | * This is the Inode Attributes structure, used for notify_change(). It | 342 | * This is the Inode Attributes structure, used for notify_change(). It |
@@ -792,7 +795,7 @@ struct file { | |||
792 | #define f_dentry f_path.dentry | 795 | #define f_dentry f_path.dentry |
793 | #define f_vfsmnt f_path.mnt | 796 | #define f_vfsmnt f_path.mnt |
794 | const struct file_operations *f_op; | 797 | const struct file_operations *f_op; |
795 | atomic_t f_count; | 798 | atomic_long_t f_count; |
796 | unsigned int f_flags; | 799 | unsigned int f_flags; |
797 | mode_t f_mode; | 800 | mode_t f_mode; |
798 | loff_t f_pos; | 801 | loff_t f_pos; |
@@ -821,8 +824,8 @@ extern spinlock_t files_lock; | |||
821 | #define file_list_lock() spin_lock(&files_lock); | 824 | #define file_list_lock() spin_lock(&files_lock); |
822 | #define file_list_unlock() spin_unlock(&files_lock); | 825 | #define file_list_unlock() spin_unlock(&files_lock); |
823 | 826 | ||
824 | #define get_file(x) atomic_inc(&(x)->f_count) | 827 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
825 | #define file_count(x) atomic_read(&(x)->f_count) | 828 | #define file_count(x) atomic_long_read(&(x)->f_count) |
826 | 829 | ||
827 | #ifdef CONFIG_DEBUG_WRITECOUNT | 830 | #ifdef CONFIG_DEBUG_WRITECOUNT |
828 | static inline void file_take_write(struct file *f) | 831 | static inline void file_take_write(struct file *f) |
@@ -1136,7 +1139,7 @@ extern int vfs_permission(struct nameidata *, int); | |||
1136 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); | 1139 | extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); |
1137 | extern int vfs_mkdir(struct inode *, struct dentry *, int); | 1140 | extern int vfs_mkdir(struct inode *, struct dentry *, int); |
1138 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); | 1141 | extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); |
1139 | extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); | 1142 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); |
1140 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); | 1143 | extern int vfs_link(struct dentry *, struct inode *, struct dentry *); |
1141 | extern int vfs_rmdir(struct inode *, struct dentry *); | 1144 | extern int vfs_rmdir(struct inode *, struct dentry *); |
1142 | extern int vfs_unlink(struct inode *, struct dentry *); | 1145 | extern int vfs_unlink(struct inode *, struct dentry *); |
@@ -1272,7 +1275,7 @@ struct inode_operations { | |||
1272 | void * (*follow_link) (struct dentry *, struct nameidata *); | 1275 | void * (*follow_link) (struct dentry *, struct nameidata *); |
1273 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1276 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1274 | void (*truncate) (struct inode *); | 1277 | void (*truncate) (struct inode *); |
1275 | int (*permission) (struct inode *, int, struct nameidata *); | 1278 | int (*permission) (struct inode *, int); |
1276 | int (*setattr) (struct dentry *, struct iattr *); | 1279 | int (*setattr) (struct dentry *, struct iattr *); |
1277 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1280 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
1278 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 1281 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -1696,9 +1699,9 @@ extern void init_special_inode(struct inode *, umode_t, dev_t); | |||
1696 | extern void make_bad_inode(struct inode *); | 1699 | extern void make_bad_inode(struct inode *); |
1697 | extern int is_bad_inode(struct inode *); | 1700 | extern int is_bad_inode(struct inode *); |
1698 | 1701 | ||
1699 | extern const struct file_operations read_fifo_fops; | 1702 | extern const struct file_operations read_pipefifo_fops; |
1700 | extern const struct file_operations write_fifo_fops; | 1703 | extern const struct file_operations write_pipefifo_fops; |
1701 | extern const struct file_operations rdwr_fifo_fops; | 1704 | extern const struct file_operations rdwr_pipefifo_fops; |
1702 | 1705 | ||
1703 | extern int fs_may_remount_ro(struct super_block *); | 1706 | extern int fs_may_remount_ro(struct super_block *); |
1704 | 1707 | ||
@@ -1767,7 +1770,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, | |||
1767 | extern sector_t bmap(struct inode *, sector_t); | 1770 | extern sector_t bmap(struct inode *, sector_t); |
1768 | #endif | 1771 | #endif |
1769 | extern int notify_change(struct dentry *, struct iattr *); | 1772 | extern int notify_change(struct dentry *, struct iattr *); |
1770 | extern int permission(struct inode *, int, struct nameidata *); | 1773 | extern int inode_permission(struct inode *, int); |
1771 | extern int generic_permission(struct inode *, int, | 1774 | extern int generic_permission(struct inode *, int, |
1772 | int (*check_acl)(struct inode *, int)); | 1775 | int (*check_acl)(struct inode *, int)); |
1773 | 1776 | ||
@@ -1831,7 +1834,7 @@ extern void clear_inode(struct inode *); | |||
1831 | extern void destroy_inode(struct inode *); | 1834 | extern void destroy_inode(struct inode *); |
1832 | extern struct inode *new_inode(struct super_block *); | 1835 | extern struct inode *new_inode(struct super_block *); |
1833 | extern int should_remove_suid(struct dentry *); | 1836 | extern int should_remove_suid(struct dentry *); |
1834 | extern int remove_suid(struct dentry *); | 1837 | extern int file_remove_suid(struct file *); |
1835 | 1838 | ||
1836 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1839 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1837 | extern void remove_inode_hash(struct inode *); | 1840 | extern void remove_inode_hash(struct inode *); |