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>
This commit is contained in:
Lars Ellenberg
2011-02-21 13:20:55 +01:00
committed by Philipp Reisner
parent 61610420f7
commit 4738fa1690
4 changed files with 7 additions and 12 deletions
+1 -2
View File
@@ -275,8 +275,7 @@ static inline int lc_try_lock(struct lru_cache *lc)
*/
static inline void lc_unlock(struct lru_cache *lc)
{
clear_bit(__LC_DIRTY, &lc->flags);
smp_mb__after_clear_bit();
clear_bit_unlock(__LC_DIRTY, &lc->flags);
}
static inline int lc_is_used(struct lru_cache *lc, unsigned int enr)