linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 14/14] xfs: use atomic_dec_not_zero()
@ 2017-01-30 18:48 Fabian Frederick
  2017-01-31  0:30 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2017-01-30 18:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, darrick.wong, linux-xfs, Fabian Frederick

instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@skynet.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-31  5:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30 18:48 [PATCH 14/14] xfs: use atomic_dec_not_zero() Fabian Frederick
2017-01-31  0:30 ` Darrick J. Wong
2017-01-31  5:18   ` 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).