diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dcache.h | 4 | ||||
-rw-r--r-- | include/linux/file.h | 3 | ||||
-rw-r--r-- | include/linux/fs.h | 33 | ||||
-rw-r--r-- | include/linux/namei.h | 18 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 2 | ||||
-rw-r--r-- | include/linux/quota.h | 2 | ||||
-rw-r--r-- | include/linux/quotaops.h | 8 | ||||
-rw-r--r-- | include/linux/sched.h | 3 | ||||
-rw-r--r-- | include/linux/task_work.h | 18 | ||||
-rw-r--r-- | include/linux/tracehook.h | 2 | ||||
-rw-r--r-- | include/linux/types.h | 9 |
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 | ||
146 | struct dentry_operations { | 146 | struct 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 | ||
40 | extern void fd_install(unsigned int fd, struct file *file); | 40 | extern void fd_install(unsigned int fd, struct file *file); |
41 | 41 | ||
42 | extern void flush_delayed_fput(void); | ||
43 | extern 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 | */ |
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; |
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 | ||
8 | struct vfsmount; | 8 | struct vfsmount; |
9 | 9 | ||
10 | struct open_intent { | ||
11 | int flags; | ||
12 | int create_mode; | ||
13 | struct file *file; | ||
14 | }; | ||
15 | |||
16 | enum { MAX_NESTED_LINKS = 8 }; | 10 | enum { MAX_NESTED_LINKS = 8 }; |
17 | 11 | ||
18 | struct nameidata { | 12 | struct 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 | ||
79 | extern struct dentry *kern_path_create(int, const char *, struct path *, int); | 68 | extern struct dentry *kern_path_create(int, const char *, struct path *, int); |
80 | extern struct dentry *user_path_create(int, const char __user *, struct path *, int); | 69 | extern struct dentry *user_path_create(int, const char __user *, struct path *, int); |
81 | extern int kern_path_parent(const char *, struct nameidata *); | 70 | extern struct dentry *kern_path_locked(const char *, struct path *); |
82 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 71 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
83 | const char *, unsigned int, struct path *); | 72 | const char *, unsigned int, struct path *); |
84 | 73 | ||
85 | extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, | ||
86 | int (*open)(struct inode *, struct file *)); | ||
87 | |||
88 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 74 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
89 | 75 | ||
90 | extern int follow_down_one(struct path *); | 76 | extern int follow_down_one(struct path *); |
@@ -94,6 +80,8 @@ extern int follow_up(struct path *); | |||
94 | extern struct dentry *lock_rename(struct dentry *, struct dentry *); | 80 | extern struct dentry *lock_rename(struct dentry *, struct dentry *); |
95 | extern void unlock_rename(struct dentry *, struct dentry *); | 81 | extern void unlock_rename(struct dentry *, struct dentry *); |
96 | 82 | ||
83 | extern void nd_jump_link(struct nameidata *nd, struct path *path); | ||
84 | |||
97 | static inline void nd_set_link(struct nameidata *nd, char *path) | 85 | static 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, | |||
83 | int dquot_quota_on_mount(struct super_block *sb, char *qf_name, | 83 | int dquot_quota_on_mount(struct super_block *sb, char *qf_name, |
84 | int format_id, int type); | 84 | int format_id, int type); |
85 | int dquot_quota_off(struct super_block *sb, int type); | 85 | int dquot_quota_off(struct super_block *sb, int type); |
86 | int dquot_quota_sync(struct super_block *sb, int type, int wait); | 86 | int dquot_writeback_dquots(struct super_block *sb, int type); |
87 | int dquot_quota_sync(struct super_block *sb, int type); | ||
87 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 88 | int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
88 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 89 | int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
89 | int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, | 90 | int 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 | ||
259 | static 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 | ||
260 | static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) | 266 | static 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 | ||
7 | struct task_work; | 7 | typedef void (*task_work_func_t)(struct callback_head *); |
8 | typedef void (*task_work_func_t)(struct task_work *); | ||
9 | |||
10 | struct task_work { | ||
11 | struct hlist_node hlist; | ||
12 | task_work_func_t func; | ||
13 | void *data; | ||
14 | }; | ||
15 | 8 | ||
16 | static inline void | 9 | static inline void |
17 | init_task_work(struct task_work *twork, task_work_func_t func, void *data) | 10 | init_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 | ||
23 | int task_work_add(struct task_struct *task, struct task_work *twork, bool); | 15 | int task_work_add(struct task_struct *task, struct callback_head *twork, bool); |
24 | struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); | 16 | struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t); |
25 | void task_work_run(void); | 17 | void task_work_run(void); |
26 | 18 | ||
27 | static inline void exit_task_work(struct task_struct *task) | 19 | static 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(¤t->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 | */ |
253 | struct rcu_head { | 253 | struct 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__ */ |