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.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 17fd887c798f..48548bdd7722 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,
@@ -2061,6 +2064,14 @@ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
2061 const struct cred *); 2064 const struct cred *);
2062extern int filp_close(struct file *, fl_owner_t id); 2065extern int filp_close(struct file *, fl_owner_t id);
2063extern char * getname(const char __user *); 2066extern char * getname(const char __user *);
2067enum {
2068 FILE_CREATED = 1,
2069 FILE_OPENED = 2
2070};
2071extern int finish_open(struct file *file, struct dentry *dentry,
2072 int (*open)(struct inode *, struct file *),
2073 int *opened);
2074extern int finish_no_open(struct file *file, struct dentry *dentry);
2064 2075
2065/* fs/ioctl.c */ 2076/* fs/ioctl.c */
2066 2077
@@ -2560,7 +2571,7 @@ extern int simple_write_end(struct file *file, struct address_space *mapping,
2560 loff_t pos, unsigned len, unsigned copied, 2571 loff_t pos, unsigned len, unsigned copied,
2561 struct page *page, void *fsdata); 2572 struct page *page, void *fsdata);
2562 2573
2563extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); 2574extern 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 *); 2575extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
2565extern const struct file_operations simple_dir_operations; 2576extern const struct file_operations simple_dir_operations;
2566extern const struct inode_operations simple_dir_inode_operations; 2577extern const struct inode_operations simple_dir_inode_operations;