aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2011-02-21 07:20:55 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-10-14 10:47:42 -0400
commit4738fa16907a933d72bbcae1b8922dc9330fde92 (patch)
treed0a48980a5269758ba01545b4200c548b30b0909 /include/linux
parent61610420f764acb835af4a450251dbab2ab6d621 (diff)
drbd: use clear_bit_unlock() where appropriate
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 <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/lru_cache.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h
index 7a71ffad037c..4cceafb0732d 100644
--- a/include/linux/lru_cache.h
+++ b/include/linux/lru_cache.h
@@ -275,8 +275,7 @@ static inline int lc_try_lock(struct lru_cache *lc)
275 */ 275 */
276static inline void lc_unlock(struct lru_cache *lc) 276static inline void lc_unlock(struct lru_cache *lc)
277{ 277{
278 clear_bit(__LC_DIRTY, &lc->flags); 278 clear_bit_unlock(__LC_DIRTY, &lc->flags);
279 smp_mb__after_clear_bit();
280} 279}
281 280
282static inline int lc_is_used(struct lru_cache *lc, unsigned int enr) 281static inline int lc_is_used(struct lru_cache *lc, unsigned int enr)