diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2012-12-17 10:01:27 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-01-11 14:43:13 +0100 |
commit | 242d98f077ac0ab80920219769eb095503b93f61 (patch) | |
tree | df4bd59a6db181b796ff8687339e4335e2c59104 /block/blk.h | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
download | kernel-common-242d98f077ac0ab80920219769eb095503b93f61.tar.gz kernel-common-242d98f077ac0ab80920219769eb095503b93f61.tar.bz2 kernel-common-242d98f077ac0ab80920219769eb095503b93f61.zip |
block,elevator: use new hashtable implementation
Switch elevator to use the new hashtable implementation. This reduces the
amount of generic unrelated code in the elevator.
This also removes the dymanic allocation of the hash table. The size of the table is
constant so there's no point in paying the price of an extra dereference when accessing
it.
This patch depends on d9b482c ("hashtable: introduce a small and naive
hashtable") which was merged in v3.6.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h index 47fdfdd41520..e837b8f619b7 100644 --- a/block/blk.h +++ b/block/blk.h @@ -61,7 +61,7 @@ static inline void blk_clear_rq_complete(struct request *rq) /* * Internal elevator interface */ -#define ELV_ON_HASH(rq) (!hlist_unhashed(&(rq)->hash)) +#define ELV_ON_HASH(rq) hash_hashed(&(rq)->hash) void blk_insert_flush(struct request *rq); void blk_abort_flushes(struct request_queue *q); |