All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@primarydata.com>
To: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 2/4] NFSv4.1: Cleanup - don't opencode nfs4_put_deviceid_node()
Date: Mon,  9 Mar 2015 16:05:01 -0400	[thread overview]
Message-ID: <1425931503-37261-3-git-send-email-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <1425931503-37261-2-git-send-email-trond.myklebust@primarydata.com>

There really is no reason to do so.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/pnfs_dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/pnfs_dev.c b/fs/nfs/pnfs_dev.c
index bf23ac97d57d..7e07f4ba4822 100644
--- a/fs/nfs/pnfs_dev.c
+++ b/fs/nfs/pnfs_dev.c
@@ -238,8 +238,7 @@ nfs4_delete_deviceid(const struct pnfs_layoutdriver_type *ld,
 	spin_unlock(&nfs4_deviceid_lock);
 
 	/* balance the initial ref set in pnfs_insert_deviceid */
-	if (atomic_dec_and_test(&d->ref))
-		d->ld->free_deviceid_node(d);
+	nfs4_put_deviceid_node(d);
 }
 EXPORT_SYMBOL_GPL(nfs4_delete_deviceid);
 
@@ -323,8 +322,7 @@ _deviceid_purge_client(const struct nfs_client *clp, long hash)
 	while (!hlist_empty(&tmp)) {
 		d = hlist_entry(tmp.first, struct nfs4_deviceid_node, tmpnode);
 		hlist_del(&d->tmpnode);
-		if (atomic_dec_and_test(&d->ref))
-			d->ld->free_deviceid_node(d);
+		nfs4_put_deviceid_node(d);
 	}
 }
 
-- 
2.1.0


  reply	other threads:[~2015-03-09 20:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 20:04 [PATCH 0/4] Don't cache pNFS deviceids in violation of RFC5661 rules Trond Myklebust
2015-03-09 20:05 ` [PATCH 1/4] NFSv4.1: Convert pNFS deviceid to use kfree_rcu() Trond Myklebust
2015-03-09 20:05   ` Trond Myklebust [this message]
2015-03-09 20:05     ` [PATCH 3/4] NFSv4.1: Allow getdeviceinfo to return notification info back to caller Trond Myklebust
2015-03-09 20:05       ` [PATCH 4/4] NFSv4.1: Don't cache deviceids that have no notifications Trond Myklebust
2015-03-17 10:37         ` Christoph Hellwig
2015-03-22 19:27           ` Trond Myklebust
2015-03-25  8:55             ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425931503-37261-3-git-send-email-trond.myklebust@primarydata.com \
    --to=trond.myklebust@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tigran.mkrtchyan@desy.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.