[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170130184844.19290-1-fabf@skynet.be>
Date: Mon, 30 Jan 2017 19:48:44 +0100
From: Fabian Frederick <fabf@...net.be>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, darrick.wong@...cle.com,
linux-xfs@...r.kernel.org, Fabian Frederick <fabf@...net.be>
Subject: [PATCH 14/14] xfs: use atomic_dec_not_zero()
instead of atomic_add_unless(value, -1, 0)
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
fs/xfs/xfs_buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index ac3b4db..51b2167 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1684,7 +1684,7 @@ xfs_buftarg_isolate(
* zero. If the value is already zero, we need to reclaim the
* buffer, otherwise it gets another trip through the LRU.
*/
- if (!atomic_add_unless(&bp->b_lru_ref, -1, 0)) {
+ if (!atomic_dec_not_zero(&bp->b_lru_ref)) {
spin_unlock(&bp->b_lock);
return LRU_ROTATE;
}
--
2.9.3
Powered by blists - more mailing lists