diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-13 18:33:37 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-13 18:33:37 -0500 |
commit | 42ec57a8f68311bbbf4ff96a5d33c8a2e90b9d05 (patch) | |
tree | 3aead2658435f53bd637967c5722358039acc390 /include/linux | |
parent | a73f730d013ff2788389fd0c46ad3e5510f124e6 (diff) |
block: misc ioc cleanups
* int return from put_io_context() wasn't used by anybody. Make it
return void like other put functions and docbook-fy the function
comment.
* Reorder dummy declarations for !CONFIG_BLOCK case a bit.
* Make alloc_ioc_context() use __GFP_ZERO allocation, take init out of
if block and drop 0'ing.
* Docbook-fy current_io_context() comment.
This patch doesn't introduce any functional change.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/iocontext.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 5037a0ad2312..8a6ecb66346f 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -76,20 +76,14 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc) | |||
76 | 76 | ||
77 | struct task_struct; | 77 | struct task_struct; |
78 | #ifdef CONFIG_BLOCK | 78 | #ifdef CONFIG_BLOCK |
79 | int put_io_context(struct io_context *ioc); | 79 | void put_io_context(struct io_context *ioc); |
80 | void exit_io_context(struct task_struct *task); | 80 | void exit_io_context(struct task_struct *task); |
81 | struct io_context *get_io_context(gfp_t gfp_flags, int node); | 81 | struct io_context *get_io_context(gfp_t gfp_flags, int node); |
82 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); | 82 | struct io_context *alloc_io_context(gfp_t gfp_flags, int node); |
83 | #else | 83 | #else |
84 | static inline void exit_io_context(struct task_struct *task) | ||
85 | { | ||
86 | } | ||
87 | |||
88 | struct io_context; | 84 | struct io_context; |
89 | static inline int put_io_context(struct io_context *ioc) | 85 | static inline void put_io_context(struct io_context *ioc) { } |
90 | { | 86 | static inline void exit_io_context(struct task_struct *task) { } |
91 | return 1; | ||
92 | } | ||
93 | #endif | 87 | #endif |
94 | 88 | ||
95 | #endif | 89 | #endif |