aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dcache.h4
-rw-r--r--include/linux/file.h3
-rw-r--r--include/linux/fs.h33
-rw-r--r--include/linux/namei.h18
-rw-r--r--include/linux/nfs_xdr.h2
-rw-r--r--include/linux/quota.h2
-rw-r--r--include/linux/quotaops.h8
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/task_work.h18
-rw-r--r--include/linux/tracehook.h2
-rw-r--r--include/linux/types.h9
11 files changed, 53 insertions, 49 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 094789ff3e9f..caa34e50537e 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -128,7 +128,7 @@ struct dentry {
128 struct rcu_head d_rcu; 128 struct rcu_head d_rcu;
129 } d_u; 129 } d_u;
130 struct list_head d_subdirs; /* our children */ 130 struct list_head d_subdirs; /* our children */
131 struct list_head d_alias; /* inode alias list */ 131 struct hlist_node d_alias; /* inode alias list */
132}; 132};
133 133
134/* 134/*
@@ -144,7 +144,7 @@ enum dentry_d_lock_class
144}; 144};
145 145
146struct dentry_operations { 146struct dentry_operations {
147 int (*d_revalidate)(struct dentry *, struct nameidata *); 147 int (*d_revalidate)(struct dentry *, unsigned int);
148 int (*d_hash)(const struct dentry *, const struct inode *, 148 int (*d_hash)(const struct dentry *, const struct inode *,
149 struct qstr *); 149 struct qstr *);
150 int (*d_compare)(const struct dentry *, const struct inode *, 150 int (*d_compare)(const struct dentry *, const struct inode *,
diff --git a/include/linux/file.h b/include/linux/file.h
index 58bf158c53d9..a22408bac0d0 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -39,4 +39,7 @@ extern void put_unused_fd(unsigned int fd);
39 39
40extern void fd_install(unsigned int fd, struct file *file); 40extern void fd_install(unsigned int fd, struct file *file);
41 41
42extern void flush_delayed_fput(void);
43extern void __fput_sync(struct file *);
44
42#endif /* __LINUX_FILE_H */ 45#endif /* __LINUX_FILE_H */
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;
diff --git a/include/linux/namei.h b/include/linux/namei.h
index ffc02135c483..d2ef8b34b967 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -7,12 +7,6 @@
7 7
8struct vfsmount; 8struct vfsmount;
9 9
10struct open_intent {
11 int flags;
12 int create_mode;
13 struct file *file;
14};
15
16enum { MAX_NESTED_LINKS = 8 }; 10enum { MAX_NESTED_LINKS = 8 };
17 11
18struct nameidata { 12struct nameidata {
@@ -25,11 +19,6 @@ struct nameidata {
25 int last_type; 19 int last_type;
26 unsigned depth; 20 unsigned depth;
27 char *saved_names[MAX_NESTED_LINKS + 1]; 21 char *saved_names[MAX_NESTED_LINKS + 1];
28
29 /* Intent data */
30 union {
31 struct open_intent open;
32 } intent;
33}; 22};
34 23
35/* 24/*
@@ -78,13 +67,10 @@ extern int kern_path(const char *, unsigned, struct path *);
78 67
79extern struct dentry *kern_path_create(int, const char *, struct path *, int); 68extern struct dentry *kern_path_create(int, const char *, struct path *, int);
80extern struct dentry *user_path_create(int, const char __user *, struct path *, int); 69extern struct dentry *user_path_create(int, const char __user *, struct path *, int);
81extern int kern_path_parent(const char *, struct nameidata *); 70extern struct dentry *kern_path_locked(const char *, struct path *);
82extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 71extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
83 const char *, unsigned int, struct path *); 72 const char *, unsigned int, struct path *);
84 73
85extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
86 int (*open)(struct inode *, struct file *));
87
88extern struct dentry *lookup_one_len(const char *, struct dentry *, int); 74extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
89 75
90extern int follow_down_one(struct path *); 76extern int follow_down_one(struct path *);
@@ -94,6 +80,8 @@ extern int follow_up(struct path *);
94extern struct dentry *lock_rename(struct dentry *, struct dentry *); 80extern struct dentry *lock_rename(struct dentry *, struct dentry *);
95extern void unlock_rename(struct dentry *, struct dentry *); 81extern void unlock_rename(struct dentry *, struct dentry *);
96 82
83extern void nd_jump_link(struct nameidata *nd, struct path *path);
84
97static inline void nd_set_link(struct nameidata *nd, char *path) 85static inline void nd_set_link(struct nameidata *nd, char *path)
98{ 86{
99 nd->saved_names[nd->depth] = path; 87 nd->saved_names[nd->depth] = path;
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 8aadd90b808a..d3b7c18b18f4 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1374,7 +1374,7 @@ struct nfs_rpc_ops {
1374 int (*readlink)(struct inode *, struct page *, unsigned int, 1374 int (*readlink)(struct inode *, struct page *, unsigned int,
1375 unsigned int); 1375 unsigned int);
1376 int (*create) (struct inode *, struct dentry *, 1376 int (*create) (struct inode *, struct dentry *,
1377 struct iattr *, int, struct nfs_open_context *); 1377 struct iattr *, int);
1378 int (*remove) (struct inode *, struct qstr *); 1378 int (*remove) (struct inode *, struct qstr *);
1379 void (*unlink_setup) (struct rpc_message *, struct inode *dir); 1379 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
1380 void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); 1380 void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *);
diff --git a/include/linux/quota.h b/include/linux/quota.h
index c09fa042b5ea..524ede8a160a 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -333,7 +333,7 @@ struct quotactl_ops {
333 int (*quota_on)(struct super_block *, int, int, struct path *); 333 int (*quota_on)(struct super_block *, int, int, struct path *);
334 int (*quota_on_meta)(struct super_block *, int, int); 334 int (*quota_on_meta)(struct super_block *, int, int);
335 int (*quota_off)(struct super_block *, int); 335 int (*quota_off)(struct super_block *, int);
336 int (*quota_sync)(struct super_block *, int, int); 336 int (*quota_sync)(struct super_block *, int);
337 int (*get_info)(struct super_block *, int, struct if_dqinfo *); 337 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
338 int (*set_info)(struct super_block *, int, struct if_dqinfo *); 338 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
339 int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *); 339 int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 17b977304a09..ec6b65feaaba 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -83,7 +83,8 @@ int dquot_quota_on(struct super_block *sb, int type, int format_id,
83int dquot_quota_on_mount(struct super_block *sb, char *qf_name, 83int dquot_quota_on_mount(struct super_block *sb, char *qf_name,
84 int format_id, int type); 84 int format_id, int type);
85int dquot_quota_off(struct super_block *sb, int type); 85int dquot_quota_off(struct super_block *sb, int type);
86int dquot_quota_sync(struct super_block *sb, int type, int wait); 86int dquot_writeback_dquots(struct super_block *sb, int type);
87int dquot_quota_sync(struct super_block *sb, int type);
87int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 88int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
88int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 89int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
89int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, 90int dquot_get_dqblk(struct super_block *sb, int type, qid_t id,
@@ -255,6 +256,11 @@ static inline int dquot_resume(struct super_block *sb, int type)
255 256
256#define dquot_file_open generic_file_open 257#define dquot_file_open generic_file_open
257 258
259static inline int dquot_writeback_dquots(struct super_block *sb, int type)
260{
261 return 0;
262}
263
258#endif /* CONFIG_QUOTA */ 264#endif /* CONFIG_QUOTA */
259 265
260static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) 266static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 64d9df5c3a49..1a2ebd39b800 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1405,7 +1405,7 @@ struct task_struct {
1405 int (*notifier)(void *priv); 1405 int (*notifier)(void *priv);
1406 void *notifier_data; 1406 void *notifier_data;
1407 sigset_t *notifier_mask; 1407 sigset_t *notifier_mask;
1408 struct hlist_head task_works; 1408 struct callback_head *task_works;
1409 1409
1410 struct audit_context *audit_context; 1410 struct audit_context *audit_context;
1411#ifdef CONFIG_AUDITSYSCALL 1411#ifdef CONFIG_AUDITSYSCALL
@@ -1546,7 +1546,6 @@ struct task_struct {
1546 unsigned long timer_slack_ns; 1546 unsigned long timer_slack_ns;
1547 unsigned long default_timer_slack_ns; 1547 unsigned long default_timer_slack_ns;
1548 1548
1549 struct list_head *scm_work_list;
1550#ifdef CONFIG_FUNCTION_GRAPH_TRACER 1549#ifdef CONFIG_FUNCTION_GRAPH_TRACER
1551 /* Index of current stored address in ret_stack */ 1550 /* Index of current stored address in ret_stack */
1552 int curr_ret_stack; 1551 int curr_ret_stack;
diff --git a/include/linux/task_work.h b/include/linux/task_work.h
index 294d5d5e90b1..fb46b03b1852 100644
--- a/include/linux/task_work.h
+++ b/include/linux/task_work.h
@@ -4,29 +4,21 @@
4#include <linux/list.h> 4#include <linux/list.h>
5#include <linux/sched.h> 5#include <linux/sched.h>
6 6
7struct task_work; 7typedef void (*task_work_func_t)(struct callback_head *);
8typedef void (*task_work_func_t)(struct task_work *);
9
10struct task_work {
11 struct hlist_node hlist;
12 task_work_func_t func;
13 void *data;
14};
15 8
16static inline void 9static inline void
17init_task_work(struct task_work *twork, task_work_func_t func, void *data) 10init_task_work(struct callback_head *twork, task_work_func_t func)
18{ 11{
19 twork->func = func; 12 twork->func = func;
20 twork->data = data;
21} 13}
22 14
23int task_work_add(struct task_struct *task, struct task_work *twork, bool); 15int task_work_add(struct task_struct *task, struct callback_head *twork, bool);
24struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); 16struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t);
25void task_work_run(void); 17void task_work_run(void);
26 18
27static inline void exit_task_work(struct task_struct *task) 19static inline void exit_task_work(struct task_struct *task)
28{ 20{
29 if (unlikely(!hlist_empty(&task->task_works))) 21 if (unlikely(task->task_works))
30 task_work_run(); 22 task_work_run();
31} 23}
32 24
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 6a4d82bedb03..1e98b5530425 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -192,7 +192,7 @@ static inline void tracehook_notify_resume(struct pt_regs *regs)
192 * hlist_add_head(task->task_works); 192 * hlist_add_head(task->task_works);
193 */ 193 */
194 smp_mb__after_clear_bit(); 194 smp_mb__after_clear_bit();
195 if (unlikely(!hlist_empty(&current->task_works))) 195 if (unlikely(current->task_works))
196 task_work_run(); 196 task_work_run();
197} 197}
198 198
diff --git a/include/linux/types.h b/include/linux/types.h
index 9c1bd539ea70..bf0dd7524b2a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -246,14 +246,15 @@ struct ustat {
246}; 246};
247 247
248/** 248/**
249 * struct rcu_head - callback structure for use with RCU 249 * struct callback_head - callback structure for use with RCU and task_work
250 * @next: next update requests in a list 250 * @next: next update requests in a list
251 * @func: actual update function to call after the grace period. 251 * @func: actual update function to call after the grace period.
252 */ 252 */
253struct rcu_head { 253struct callback_head {
254 struct rcu_head *next; 254 struct callback_head *next;
255 void (*func)(struct rcu_head *head); 255 void (*func)(struct callback_head *head);
256}; 256};
257#define rcu_head callback_head
257 258
258#endif /* __KERNEL__ */ 259#endif /* __KERNEL__ */
259#endif /* __ASSEMBLY__ */ 260#endif /* __ASSEMBLY__ */