diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/aio.h | 21 | ||||
| -rw-r--r-- | include/linux/anon_inodes.h | 3 | ||||
| -rw-r--r-- | include/linux/migrate.h | 3 | ||||
| -rw-r--r-- | include/linux/mm_types.h | 5 |
4 files changed, 12 insertions, 20 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 1bdf965339f9..d9c92daa3944 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -27,15 +27,13 @@ struct kiocb; | |||
| 27 | */ | 27 | */ |
| 28 | #define KIOCB_CANCELLED ((void *) (~0ULL)) | 28 | #define KIOCB_CANCELLED ((void *) (~0ULL)) |
| 29 | 29 | ||
| 30 | typedef int (kiocb_cancel_fn)(struct kiocb *, struct io_event *); | 30 | typedef int (kiocb_cancel_fn)(struct kiocb *); |
| 31 | 31 | ||
| 32 | struct kiocb { | 32 | struct kiocb { |
| 33 | atomic_t ki_users; | ||
| 34 | |||
| 35 | struct file *ki_filp; | 33 | struct file *ki_filp; |
| 36 | struct kioctx *ki_ctx; /* NULL for sync ops */ | 34 | struct kioctx *ki_ctx; /* NULL for sync ops */ |
| 37 | kiocb_cancel_fn *ki_cancel; | 35 | kiocb_cancel_fn *ki_cancel; |
| 38 | void (*ki_dtor)(struct kiocb *); | 36 | void *private; |
| 39 | 37 | ||
| 40 | union { | 38 | union { |
| 41 | void __user *user; | 39 | void __user *user; |
| @@ -44,17 +42,7 @@ struct kiocb { | |||
| 44 | 42 | ||
| 45 | __u64 ki_user_data; /* user's data for completion */ | 43 | __u64 ki_user_data; /* user's data for completion */ |
| 46 | loff_t ki_pos; | 44 | loff_t ki_pos; |
| 47 | 45 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ | |
| 48 | void *private; | ||
| 49 | /* State that we remember to be able to restart/retry */ | ||
| 50 | unsigned short ki_opcode; | ||
| 51 | size_t ki_nbytes; /* copy of iocb->aio_nbytes */ | ||
| 52 | char __user *ki_buf; /* remaining iocb->aio_buf */ | ||
| 53 | size_t ki_left; /* remaining bytes */ | ||
| 54 | struct iovec ki_inline_vec; /* inline vector */ | ||
| 55 | struct iovec *ki_iovec; | ||
| 56 | unsigned long ki_nr_segs; | ||
| 57 | unsigned long ki_cur_seg; | ||
| 58 | 46 | ||
| 59 | struct list_head ki_list; /* the aio core uses this | 47 | struct list_head ki_list; /* the aio core uses this |
| 60 | * for cancellation */ | 48 | * for cancellation */ |
| @@ -74,7 +62,6 @@ static inline bool is_sync_kiocb(struct kiocb *kiocb) | |||
| 74 | static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | 62 | static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) |
| 75 | { | 63 | { |
| 76 | *kiocb = (struct kiocb) { | 64 | *kiocb = (struct kiocb) { |
| 77 | .ki_users = ATOMIC_INIT(1), | ||
| 78 | .ki_ctx = NULL, | 65 | .ki_ctx = NULL, |
| 79 | .ki_filp = filp, | 66 | .ki_filp = filp, |
| 80 | .ki_obj.tsk = current, | 67 | .ki_obj.tsk = current, |
| @@ -84,7 +71,6 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | |||
| 84 | /* prototypes */ | 71 | /* prototypes */ |
| 85 | #ifdef CONFIG_AIO | 72 | #ifdef CONFIG_AIO |
| 86 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); | 73 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); |
| 87 | extern void aio_put_req(struct kiocb *iocb); | ||
| 88 | extern void aio_complete(struct kiocb *iocb, long res, long res2); | 74 | extern void aio_complete(struct kiocb *iocb, long res, long res2); |
| 89 | struct mm_struct; | 75 | struct mm_struct; |
| 90 | extern void exit_aio(struct mm_struct *mm); | 76 | extern void exit_aio(struct mm_struct *mm); |
| @@ -93,7 +79,6 @@ extern long do_io_submit(aio_context_t ctx_id, long nr, | |||
| 93 | void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel); | 79 | void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel); |
| 94 | #else | 80 | #else |
| 95 | static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } | 81 | static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; } |
| 96 | static inline void aio_put_req(struct kiocb *iocb) { } | ||
| 97 | static inline void aio_complete(struct kiocb *iocb, long res, long res2) { } | 82 | static inline void aio_complete(struct kiocb *iocb, long res, long res2) { } |
| 98 | struct mm_struct; | 83 | struct mm_struct; |
| 99 | static inline void exit_aio(struct mm_struct *mm) { } | 84 | static inline void exit_aio(struct mm_struct *mm) { } |
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h index 8013a45242fe..cf573c22b81e 100644 --- a/include/linux/anon_inodes.h +++ b/include/linux/anon_inodes.h | |||
| @@ -13,6 +13,9 @@ struct file_operations; | |||
| 13 | struct file *anon_inode_getfile(const char *name, | 13 | struct file *anon_inode_getfile(const char *name, |
| 14 | const struct file_operations *fops, | 14 | const struct file_operations *fops, |
| 15 | void *priv, int flags); | 15 | void *priv, int flags); |
| 16 | struct file *anon_inode_getfile_private(const char *name, | ||
| 17 | const struct file_operations *fops, | ||
| 18 | void *priv, int flags); | ||
| 16 | int anon_inode_getfd(const char *name, const struct file_operations *fops, | 19 | int anon_inode_getfd(const char *name, const struct file_operations *fops, |
| 17 | void *priv, int flags); | 20 | void *priv, int flags); |
| 18 | 21 | ||
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 6fe521420631..8d3c57fdf221 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
| @@ -53,6 +53,9 @@ extern int migrate_vmas(struct mm_struct *mm, | |||
| 53 | extern void migrate_page_copy(struct page *newpage, struct page *page); | 53 | extern void migrate_page_copy(struct page *newpage, struct page *page); |
| 54 | extern int migrate_huge_page_move_mapping(struct address_space *mapping, | 54 | extern int migrate_huge_page_move_mapping(struct address_space *mapping, |
| 55 | struct page *newpage, struct page *page); | 55 | struct page *newpage, struct page *page); |
| 56 | extern int migrate_page_move_mapping(struct address_space *mapping, | ||
| 57 | struct page *newpage, struct page *page, | ||
| 58 | struct buffer_head *head, enum migrate_mode mode); | ||
| 56 | #else | 59 | #else |
| 57 | 60 | ||
| 58 | static inline void putback_lru_pages(struct list_head *l) {} | 61 | static inline void putback_lru_pages(struct list_head *l) {} |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index faf4b7c1ad12..d9851eeb6e1d 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -322,6 +322,7 @@ struct mm_rss_stat { | |||
| 322 | atomic_long_t count[NR_MM_COUNTERS]; | 322 | atomic_long_t count[NR_MM_COUNTERS]; |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | struct kioctx_table; | ||
| 325 | struct mm_struct { | 326 | struct mm_struct { |
| 326 | struct vm_area_struct * mmap; /* list of VMAs */ | 327 | struct vm_area_struct * mmap; /* list of VMAs */ |
| 327 | struct rb_root mm_rb; | 328 | struct rb_root mm_rb; |
| @@ -383,8 +384,8 @@ struct mm_struct { | |||
| 383 | 384 | ||
| 384 | struct core_state *core_state; /* coredumping support */ | 385 | struct core_state *core_state; /* coredumping support */ |
| 385 | #ifdef CONFIG_AIO | 386 | #ifdef CONFIG_AIO |
| 386 | spinlock_t ioctx_lock; | 387 | spinlock_t ioctx_lock; |
| 387 | struct hlist_head ioctx_list; | 388 | struct kioctx_table __rcu *ioctx_table; |
| 388 | #endif | 389 | #endif |
| 389 | #ifdef CONFIG_MM_OWNER | 390 | #ifdef CONFIG_MM_OWNER |
| 390 | /* | 391 | /* |
