From patchwork Tue May 24 10:53:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 811522 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4OAqTn4003028 for ; Tue, 24 May 2011 10:54:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753144Ab1EXKyB (ORCPT ); Tue, 24 May 2011 06:54:01 -0400 Received: from daytona.panasas.com ([67.152.220.89]:36896 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751833Ab1EXKyA (ORCPT ); Tue, 24 May 2011 06:54:00 -0400 Received: from fs2.bhalevy.com ([172.17.33.64]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 24 May 2011 06:54:00 -0400 Message-ID: <4DDB8E2F.8080308@panasas.com> Date: Tue, 24 May 2011 13:53:35 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110430 Remi/fc12 Thunderbird/3.1.10 MIME-Version: 1.0 To: Benny Halevy , Trond Myklebust , NFS list Subject: [PATCH 1/3] SQUSHME: pnfs: BUG in _deviceid_purge_client References: <4DDB8DD1.20101@panasas.com> In-Reply-To: <4DDB8DD1.20101@panasas.com> X-OriginalArrivalTime: 24 May 2011 10:54:00.0309 (UTC) FILETIME=[E352FA50:01CC1A00] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 24 May 2011 10:54:02 +0000 (UTC) The atomic_dec_and_test() returns *true* when zero. The ! belongs to atomic_dec(). Fixit Signed-off-by: Boaz Harrosh --- fs/nfs/pnfs_dev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c index 7e5542c..37ca215 100644 --- a/fs/nfs/pnfs_dev.c +++ b/fs/nfs/pnfs_dev.c @@ -258,7 +258,7 @@ _deviceid_purge_client(const struct nfs_client *clp, long hash) synchronize_rcu(); hlist_for_each_entry_safe(d, n, next, &tmp, node) - if (!atomic_dec_and_test(&d->ref)) { + if (atomic_dec_and_test(&d->ref)) { if (d->ld->free_deviceid_node) d->ld->free_deviceid_node(d); else