mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sunrpc: Switch to using hash list instead single list
Switch using list_head for cache_head in cache_detail, it is useful of remove an cache_head entry directly from cache_detail. v8, using hash list, not head list Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
c8c081b70c
commit
129e5824cd
2 changed files with 33 additions and 31 deletions
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
*/
|
||||
struct cache_head {
|
||||
struct cache_head * next;
|
||||
struct hlist_node cache_list;
|
||||
time_t expiry_time; /* After time time, don't use the data */
|
||||
time_t last_refresh; /* If CACHE_PENDING, this is when upcall
|
||||
* was sent, else this is when update was received
|
||||
|
@ -73,7 +73,7 @@ struct cache_detail_pipefs {
|
|||
struct cache_detail {
|
||||
struct module * owner;
|
||||
int hash_size;
|
||||
struct cache_head ** hash_table;
|
||||
struct hlist_head * hash_table;
|
||||
rwlock_t hash_lock;
|
||||
|
||||
atomic_t inuse; /* active user-space update or lookup */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue