From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Eckelmann Subject: [PATCHv4 08/11] xfs: Use *_dec_not_zero instead of *_add_unless Date: Wed, 27 Jul 2011 11:47:47 +0200 Message-ID: <1311760070-21532-8-git-send-email-sven@narfation.org> References: <1311760070-21532-1-git-send-email-sven@narfation.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1311760070-21532-1-git-send-email-sven@narfation.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: linux-arch@vger.kernel.org Cc: xfs-masters@oss.sgi.com, xfs@oss.sgi.com, linux-kernel@vger.kernel.org, Sven Eckelmann , Alex Elder List-Id: linux-arch.vger.kernel.org atomic_dec_not_zero is defined for each architecture through to provide the functionality of atomic_add_unless(x, -1, 0). Signed-off-by: Sven Eckelmann Cc: Alex Elder Cc: xfs-masters@oss.sgi.com Cc: xfs@oss.sgi.com --- fs/xfs/linux-2.6/xfs_buf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index b2b4119..a68d9bf 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -1429,7 +1429,7 @@ xfs_buftarg_shrink( * 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)) { list_move_tail(&bp->b_lru, &btp->bt_lru); continue; } -- 1.7.5.4 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from narfation.org ([79.140.41.39]:43168 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753527Ab1G0Jzw (ORCPT ); Wed, 27 Jul 2011 05:55:52 -0400 From: Sven Eckelmann Subject: [PATCHv4 08/11] xfs: Use *_dec_not_zero instead of *_add_unless Date: Wed, 27 Jul 2011 11:47:47 +0200 Message-ID: <1311760070-21532-8-git-send-email-sven@narfation.org> In-Reply-To: <1311760070-21532-1-git-send-email-sven@narfation.org> References: <1311760070-21532-1-git-send-email-sven@narfation.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Sven Eckelmann , Alex Elder , xfs-masters@oss.sgi.com, xfs@oss.sgi.com Message-ID: <20110727094747.b-zDCgZ_2DqFW5B77yErw6tdcfr1B_0iNeRJpgHSFoU@z> atomic_dec_not_zero is defined for each architecture through to provide the functionality of atomic_add_unless(x, -1, 0). Signed-off-by: Sven Eckelmann Cc: Alex Elder Cc: xfs-masters@oss.sgi.com Cc: xfs@oss.sgi.com --- fs/xfs/linux-2.6/xfs_buf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index b2b4119..a68d9bf 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -1429,7 +1429,7 @@ xfs_buftarg_shrink( * 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)) { list_move_tail(&bp->b_lru, &btp->bt_lru); continue; } -- 1.7.5.4