]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nfs/pnfs_dev.c
NFSv4.1: Cleanup - don't opencode nfs4_put_deviceid_node()
[karo-tx-linux.git] / fs / nfs / pnfs_dev.c
index bf23ac97d57d28a5d28880197a8d25b7e33a27af..7e07f4ba482268410bf970cd0664f61a642f92ad 100644 (file)
@@ -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);
        }
 }