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>
This commit is contained in:
Tejun Heo
2011-12-14 00:33:41 +01:00
committed by Jens Axboe
parent f8fc877d3c
commit 22f746e235
3 changed files with 43 additions and 46 deletions

View File

@@ -78,11 +78,11 @@ struct elv_fs_entry {
*/
struct elevator_type
{
struct list_head list;
struct elevator_ops ops;
struct elv_fs_entry *elevator_attrs;
char elevator_name[ELV_NAME_MAX];
struct module *elevator_owner;
struct list_head list;
};
/*
@@ -90,10 +90,9 @@ struct elevator_type
*/
struct elevator_queue
{
struct elevator_ops *ops;
struct elevator_type *type;
void *elevator_data;
struct kobject kobj;
struct elevator_type *elevator_type;
struct mutex sysfs_lock;
struct hlist_head *hash;
unsigned int registered:1;