ax25_uid.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) ax25_uid.c (ae1b6a31b1f9ef2c7ba5ef89799f210a9ba6937c)
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */

--- 204 unchanged lines hidden (view full) ---

213 * Free all memory associated with UID/Callsign structures.
214 */
215void __exit ax25_uid_free(void)
216{
217 ax25_uid_assoc *ax25_uid;
218 struct hlist_node *node;
219
220 write_lock(&ax25_uid_lock);
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */

--- 204 unchanged lines hidden (view full) ---

213 * Free all memory associated with UID/Callsign structures.
214 */
215void __exit ax25_uid_free(void)
216{
217 ax25_uid_assoc *ax25_uid;
218 struct hlist_node *node;
219
220 write_lock(&ax25_uid_lock);
221again:
221 ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
222 hlist_del_init(&ax25_uid->uid_node);
223 ax25_uid_put(ax25_uid);
222 ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) {
223 hlist_del_init(&ax25_uid->uid_node);
224 ax25_uid_put(ax25_uid);
225 goto again;
224 }
225 write_unlock(&ax25_uid_lock);
226}
226 }
227 write_unlock(&ax25_uid_lock);
228}