mbcache: get rid of _e_hash_list_head
Get rid of field _e_hash_list_head in cache entries and add bit field
e_referenced instead.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
diff --git a/include/linux/mbcache.h b/include/linux/mbcache.h
index a74a1f3..607e696 100644
--- a/include/linux/mbcache.h
+++ b/include/linux/mbcache.h
@@ -12,18 +12,14 @@
struct mb_cache_entry {
/* List of entries in cache - protected by cache->c_list_lock */
struct list_head e_list;
- /* Hash table list - protected by bitlock in e_hash_list_head */
+ /* Hash table list - protected by hash chain bitlock */
struct hlist_bl_node e_hash_list;
atomic_t e_refcnt;
/* Key in hash - stable during lifetime of the entry */
u32 e_key;
+ u32 e_referenced:1;
/* Block number of hashed block - stable during lifetime of the entry */
sector_t e_block;
- /*
- * Head of hash list (for list bit lock) - stable. Combined with
- * referenced bit of entry
- */
- unsigned long _e_hash_list_head;
};
struct mb_cache *mb_cache_create(int bucket_bits);