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.h33
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 */
1574extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *); 1574extern int vfs_create(struct inode *, struct dentry *, umode_t, bool);
1575extern int vfs_mkdir(struct inode *, struct dentry *, umode_t); 1575extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);
1576extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t); 1576extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
1577extern int vfs_symlink(struct inode *, struct dentry *, const char *); 1577extern int vfs_symlink(struct inode *, struct dentry *, const char *);
@@ -1666,7 +1666,7 @@ struct file_operations {
1666}; 1666};
1667 1667
1668struct inode_operations { 1668struct 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
1698struct seq_file; 1701struct seq_file;
@@ -1911,7 +1914,7 @@ void free_anon_bdev(dev_t);
1911struct super_block *sget(struct file_system_type *type, 1914struct 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);
1915extern struct dentry *mount_pseudo(struct file_system_type *, char *, 1918extern 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,
2057extern struct file *filp_open(const char *, int, umode_t); 2060extern struct file *filp_open(const char *, int, umode_t);
2058extern struct file *file_open_root(struct dentry *, struct vfsmount *, 2061extern struct file *file_open_root(struct dentry *, struct vfsmount *,
2059 const char *, int); 2062 const char *, int);
2060extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, 2063extern struct file * dentry_open(const struct path *, int, const struct cred *);
2061 const struct cred *);
2062extern int filp_close(struct file *, fl_owner_t id); 2064extern int filp_close(struct file *, fl_owner_t id);
2063extern char * getname(const char __user *); 2065extern char * getname(const char __user *);
2066enum {
2067 FILE_CREATED = 1,
2068 FILE_OPENED = 2
2069};
2070extern int finish_open(struct file *file, struct dentry *dentry,
2071 int (*open)(struct inode *, struct file *),
2072 int *opened);
2073extern 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);
2091extern void bd_forget(struct inode *inode); 2101extern void bd_forget(struct inode *inode);
2092extern void bdput(struct block_device *); 2102extern void bdput(struct block_device *);
2093extern void invalidate_bdev(struct block_device *); 2103extern void invalidate_bdev(struct block_device *);
2104extern void iterate_bdevs(void (*)(struct block_device *, void *), void *);
2094extern int sync_blockdev(struct block_device *bdev); 2105extern int sync_blockdev(struct block_device *bdev);
2095extern void kill_bdev(struct block_device *); 2106extern void kill_bdev(struct block_device *);
2096extern struct super_block *freeze_bdev(struct block_device *); 2107extern 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
2127static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg)
2128{
2129}
2115#endif 2130#endif
2116extern int sync_filesystem(struct super_block *); 2131extern int sync_filesystem(struct super_block *);
2117extern const struct file_operations def_blk_fops; 2132extern const struct file_operations def_blk_fops;
@@ -2438,7 +2453,7 @@ extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);
2438extern loff_t no_llseek(struct file *file, loff_t offset, int origin); 2453extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
2439extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); 2454extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
2440extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, 2455extern 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);
2442extern int generic_file_open(struct inode * inode, struct file * filp); 2457extern int generic_file_open(struct inode * inode, struct file * filp);
2443extern int nonseekable_open(struct inode * inode, struct file * filp); 2458extern 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
2563extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); 2578extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned int flags);
2564extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); 2579extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
2565extern const struct file_operations simple_dir_operations; 2580extern const struct file_operations simple_dir_operations;
2566extern const struct inode_operations simple_dir_inode_operations; 2581extern const struct inode_operations simple_dir_inode_operations;