* [PATCH 13/14] ext4: use atomic_dec_not_zero()
@ 2017-01-30 18:48 Fabian Frederick
0 siblings, 0 replies; only message in thread
From: Fabian Frederick @ 2017-01-30 18:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, tytso, linux-ext4, Fabian Frederick
instead of atomic_add_unless(value, -1, 0)
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/ext4/ext4.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 164a2e0..3184c25 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2916,7 +2916,7 @@ static inline void ext4_lock_group(struct super_block *sb, ext4_group_t group)
* We're able to grab the lock right away, so drop the
* lock contention counter.
*/
- atomic_add_unless(&EXT4_SB(sb)->s_lock_busy, -1, 0);
+ atomic_dec_not_zero(&EXT4_SB(sb)->s_lock_busy);
else {
/*
* The lock is busy, so bump the contention counter,
--
2.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-30 18:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 18:48 [PATCH 13/14] ext4: use atomic_dec_not_zero() Fabian Frederick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).