aboutsummaryrefslogtreecommitdiff
path: root/lib/lru_cache.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-14lru_cache: allow multiple changes per transactionLars Ellenberg1-76/+167
Allow multiple changes to the active set of elements in lru_cache. The only current user of lru_cache, drbd, is driving this generalisation. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]>
2011-10-14lru_cache: consolidate lc_get and lc_try_getLars Ellenberg1-59/+61
Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]>
2011-10-14lru_cache.h: fix comments referring to ts_ instead of lc_Lars Ellenberg1-1/+1
For some time we contemplated calling the "struct lru_cache" a "struct tracked_set", and some comments kept the ts_ prefix. Fix those to match the member field names. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]>
2011-10-14drbd: use clear_bit_unlock() where appropriateLars Ellenberg1-6/+4
Some open-coded clear_bit(); smp_mb__after_clear_bit(); should in fact have been smp_mb__before_clear_bit(); clear_bit(); Instead, use clear_bit_unlock() to annotate the intention, and have it do the right thing. Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]>
2011-05-25lru_cache: use correct type in sizeof for allocationIlia Mirkin1-1/+1
This has no actual effect, since sizeof(struct hlist_head) == sizeof(struct hlist_head *), but it's still the wrong type to use. The semantic match that finds this problem: // <smpl> @@ type T; identifier x; @@ T *x; ... * x = kzalloc(... * sizeof(T*) * ..., ...); // </smpl> [[email protected]: use kcalloc()] Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Lars Ellenberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-10-01The DRBD driverPhilipp Reisner1-0/+560
Signed-off-by: Philipp Reisner <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]>