aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-12-13 18:33:41 -0500
committerJens Axboe <axboe@kernel.dk>2011-12-13 18:33:41 -0500
commit22f746e235a5cbee2a6ca9887b1be2aa7d31fe71 (patch)
treea9786fe9fdb994b5ff69794023e6e3e48e39e0b0 /include/linux/elevator.h
parentf8fc877d3c1f10457d0d73d8540a0c51a1fa718a (diff)
block: remove elevator_queue->ops
elevator_queue->ops points to the same ops struct ->elevator_type.ops is pointing to. The only effect of caching it in elevator_queue is shorter notation - it doesn't save any indirect derefence. Relocate elevator_type->list which used only during module init/exit to the end of the structure, rename elevator_queue->elevator_type to ->type, and replace elevator_queue->ops with elevator_queue->type.ops. This doesn't introduce any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 02604c89ddde..04958ef53e62 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -78,11 +78,11 @@ struct elv_fs_entry {
78 */ 78 */
79struct elevator_type 79struct elevator_type
80{ 80{
81 struct list_head list;
82 struct elevator_ops ops; 81 struct elevator_ops ops;
83 struct elv_fs_entry *elevator_attrs; 82 struct elv_fs_entry *elevator_attrs;
84 char elevator_name[ELV_NAME_MAX]; 83 char elevator_name[ELV_NAME_MAX];
85 struct module *elevator_owner; 84 struct module *elevator_owner;
85 struct list_head list;
86}; 86};
87 87
88/* 88/*
@@ -90,10 +90,9 @@ struct elevator_type
90 */ 90 */
91struct elevator_queue 91struct elevator_queue
92{ 92{
93 struct elevator_ops *ops; 93 struct elevator_type *type;
94 void *elevator_data; 94 void *elevator_data;
95 struct kobject kobj; 95 struct kobject kobj;
96 struct elevator_type *elevator_type;
97 struct mutex sysfs_lock; 96 struct mutex sysfs_lock;
98 struct hlist_head *hash; 97 struct hlist_head *hash;
99 unsigned int registered:1; 98 unsigned int registered:1;