diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 17fd887c798f..8fabb037a48d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -826,7 +826,7 @@ struct inode { | |||
826 | struct list_head i_lru; /* inode LRU list */ | 826 | struct list_head i_lru; /* inode LRU list */ |
827 | struct list_head i_sb_list; | 827 | struct list_head i_sb_list; |
828 | union { | 828 | union { |
829 | struct list_head i_dentry; | 829 | struct hlist_head i_dentry; |
830 | struct rcu_head i_rcu; | 830 | struct rcu_head i_rcu; |
831 | }; | 831 | }; |
832 | u64 i_version; | 832 | u64 i_version; |
@@ -1571,7 +1571,7 @@ extern void unlock_super(struct super_block *); | |||
1571 | /* | 1571 | /* |
1572 | * VFS helper functions.. | 1572 | * VFS helper functions.. |
1573 | */ | 1573 | */ |
1574 | extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); | 1574 | extern int vfs_create(struct inode *, struct dentry *, umode_t, bool); |
1575 | extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); | 1575 | extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); |
1576 | extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); | 1576 | extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); |
1577 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); | 1577 | extern int vfs_symlink(struct inode *, struct dentry *, const char *); |
@@ -1666,7 +1666,7 @@ struct file_operations { | |||
1666 | }; | 1666 | }; |
1667 | 1667 | ||
1668 | struct inode_operations { | 1668 | struct inode_operations { |
1669 | struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); | 1669 | struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); |
1670 | void * (*follow_link) (struct dentry *, struct nameidata *); | 1670 | void * (*follow_link) (struct dentry *, struct nameidata *); |
1671 | int (*permission) (struct inode *, int); | 1671 | int (*permission) (struct inode *, int); |
1672 | struct posix_acl * (*get_acl)(struct inode *, int); | 1672 | struct posix_acl * (*get_acl)(struct inode *, int); |
@@ -1674,7 +1674,7 @@ struct inode_operations { | |||
1674 | int (*readlink) (struct dentry *, char __user *,int); | 1674 | int (*readlink) (struct dentry *, char __user *,int); |
1675 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1675 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1676 | 1676 | ||
1677 | int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *); | 1677 | int (*create) (struct inode *,struct dentry *, umode_t, bool); |
1678 | int (*link) (struct dentry *,struct inode *,struct dentry *); | 1678 | int (*link) (struct dentry *,struct inode *,struct dentry *); |
1679 | int (*unlink) (struct inode *,struct dentry *); | 1679 | int (*unlink) (struct inode *,struct dentry *); |
1680 | int (*symlink) (struct inode *,struct dentry *,const char *); | 1680 | int (*symlink) (struct inode *,struct dentry *,const char *); |
@@ -1693,6 +1693,9 @@ struct inode_operations { | |||
1693 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1693 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
1694 | u64 len); | 1694 | u64 len); |
1695 | int (*update_time)(struct inode *, struct timespec *, int); | 1695 | int (*update_time)(struct inode *, struct timespec *, int); |
1696 | int (*atomic_open)(struct inode *, struct dentry *, | ||
1697 | struct file *, unsigned open_flag, | ||
1698 | umode_t create_mode, int *opened); | ||
1696 | } ____cacheline_aligned; | 1699 | } ____cacheline_aligned; |
1697 | 1700 | ||
1698 | struct seq_file; | 1701 | struct seq_file; |
@@ -1911,7 +1914,7 @@ void free_anon_bdev(dev_t); | |||
1911 | struct super_block *sget(struct file_system_type *type, | 1914 | struct super_block *sget(struct file_system_type *type, |
1912 | int (*test)(struct super_block *,void *), | 1915 | int (*test)(struct super_block *,void *), |
1913 | int (*set)(struct super_block *,void *), | 1916 | int (*set)(struct super_block *,void *), |
1914 | void *data); | 1917 | int flags, void *data); |
1915 | extern struct dentry *mount_pseudo(struct file_system_type *, char *, | 1918 | extern struct dentry *mount_pseudo(struct file_system_type *, char *, |
1916 | const struct super_operations *ops, | 1919 | const struct super_operations *ops, |
1917 | const struct dentry_operations *dops, | 1920 | const struct dentry_operations *dops, |
@@ -2057,10 +2060,17 @@ extern long do_sys_open(int dfd, const char __user *filename, int flags, | |||
2057 | extern struct file *filp_open(const char *, int, umode_t); | 2060 | extern struct file *filp_open(const char *, int, umode_t); |
2058 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | 2061 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, |
2059 | const char *, int); | 2062 | const char *, int); |
2060 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | 2063 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
2061 | const struct cred *); | ||
2062 | extern int filp_close(struct file *, fl_owner_t id); | 2064 | extern int filp_close(struct file *, fl_owner_t id); |
2063 | extern char * getname(const char __user *); | 2065 | extern char * getname(const char __user *); |
2066 | enum { | ||
2067 | FILE_CREATED = 1, | ||
2068 | FILE_OPENED = 2 | ||
2069 | }; | ||
2070 | extern int finish_open(struct file *file, struct dentry *dentry, | ||
2071 | int (*open)(struct inode *, struct file *), | ||
2072 | int *opened); | ||
2073 | extern int finish_no_open(struct file *file, struct dentry *dentry); | ||
2064 | 2074 | ||
2065 | /* fs/ioctl.c */ | 2075 | /* fs/ioctl.c */ |
2066 | 2076 | ||
@@ -2091,6 +2101,7 @@ extern sector_t blkdev_max_block(struct block_device *bdev); | |||
2091 | extern void bd_forget(struct inode *inode); | 2101 | extern void bd_forget(struct inode *inode); |
2092 | extern void bdput(struct block_device *); | 2102 | extern void bdput(struct block_device *); |
2093 | extern void invalidate_bdev(struct block_device *); | 2103 | extern void invalidate_bdev(struct block_device *); |
2104 | extern void iterate_bdevs(void (*)(struct block_device *, void *), void *); | ||
2094 | extern int sync_blockdev(struct block_device *bdev); | 2105 | extern int sync_blockdev(struct block_device *bdev); |
2095 | extern void kill_bdev(struct block_device *); | 2106 | extern void kill_bdev(struct block_device *); |
2096 | extern struct super_block *freeze_bdev(struct block_device *); | 2107 | extern struct super_block *freeze_bdev(struct block_device *); |
@@ -2112,6 +2123,10 @@ static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb) | |||
2112 | { | 2123 | { |
2113 | return 0; | 2124 | return 0; |
2114 | } | 2125 | } |
2126 | |||
2127 | static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg) | ||
2128 | { | ||
2129 | } | ||
2115 | #endif | 2130 | #endif |
2116 | extern int sync_filesystem(struct super_block *); | 2131 | extern int sync_filesystem(struct super_block *); |
2117 | extern const struct file_operations def_blk_fops; | 2132 | extern const struct file_operations def_blk_fops; |
@@ -2438,7 +2453,7 @@ extern loff_t noop_llseek(struct file *file, loff_t offset, int origin); | |||
2438 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); | 2453 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); |
2439 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); | 2454 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); |
2440 | extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, | 2455 | extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, |
2441 | int origin, loff_t maxsize); | 2456 | int origin, loff_t maxsize, loff_t eof); |
2442 | extern int generic_file_open(struct inode * inode, struct file * filp); | 2457 | extern int generic_file_open(struct inode * inode, struct file * filp); |
2443 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 2458 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
2444 | 2459 | ||
@@ -2560,7 +2575,7 @@ extern int simple_write_end(struct file *file, struct address_space *mapping, | |||
2560 | loff_t pos, unsigned len, unsigned copied, | 2575 | loff_t pos, unsigned len, unsigned copied, |
2561 | struct page *page, void *fsdata); | 2576 | struct page *page, void *fsdata); |
2562 | 2577 | ||
2563 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 2578 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned int flags); |
2564 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 2579 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
2565 | extern const struct file_operations simple_dir_operations; | 2580 | extern const struct file_operations simple_dir_operations; |
2566 | extern const struct inode_operations simple_dir_inode_operations; | 2581 | extern const struct inode_operations simple_dir_inode_operations; |