Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
01b78182
Commit
01b78182
authored
Oct 01, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ATM]: Use neigh_table_{init,clear}() in clip.c
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
686ccb6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
net/atm/clip.c
net/atm/clip.c
+14
-15
No files found.
net/atm/clip.c
View file @
01b78182
...
@@ -984,19 +984,7 @@ static struct file_operations arp_seq_fops = {
...
@@ -984,19 +984,7 @@ static struct file_operations arp_seq_fops = {
static
int
__init
atm_clip_init
(
void
)
static
int
__init
atm_clip_init
(
void
)
{
{
/* we should use neigh_table_init() */
neigh_table_init
(
&
clip_tbl
);
clip_tbl
.
lock
=
RW_LOCK_UNLOCKED
;
clip_tbl
.
kmem_cachep
=
kmem_cache_create
(
clip_tbl
.
id
,
clip_tbl
.
entry_size
,
0
,
SLAB_HWCACHE_ALIGN
,
NULL
,
NULL
);
if
(
!
clip_tbl
.
kmem_cachep
)
return
-
ENOMEM
;
/* so neigh_ifdown() doesn't complain */
clip_tbl
.
proxy_timer
.
data
=
0
;
clip_tbl
.
proxy_timer
.
function
=
NULL
;
init_timer
(
&
clip_tbl
.
proxy_timer
);
skb_queue_head_init
(
&
clip_tbl
.
proxy_queue
);
clip_tbl_hook
=
&
clip_tbl
;
clip_tbl_hook
=
&
clip_tbl
;
register_atm_ioctl
(
&
clip_ioctl_ops
);
register_atm_ioctl
(
&
clip_ioctl_ops
);
...
@@ -1022,7 +1010,18 @@ static void __exit atm_clip_exit(void)
...
@@ -1022,7 +1010,18 @@ static void __exit atm_clip_exit(void)
deregister_atm_ioctl
(
&
clip_ioctl_ops
);
deregister_atm_ioctl
(
&
clip_ioctl_ops
);
/* First, stop the idle timer, so it stops banging
* on the table.
*/
if
(
start_timer
==
0
)
del_timer
(
&
idle_timer
);
/* Next, purge the table, so that the device
* unregister loop below does not hang due to
* device references remaining in the table.
*/
neigh_ifdown
(
&
clip_tbl
,
NULL
);
neigh_ifdown
(
&
clip_tbl
,
NULL
);
dev
=
clip_devs
;
dev
=
clip_devs
;
while
(
dev
)
{
while
(
dev
)
{
next
=
PRIV
(
dev
)
->
next
;
next
=
PRIV
(
dev
)
->
next
;
...
@@ -1030,9 +1029,9 @@ static void __exit atm_clip_exit(void)
...
@@ -1030,9 +1029,9 @@ static void __exit atm_clip_exit(void)
free_netdev
(
dev
);
free_netdev
(
dev
);
dev
=
next
;
dev
=
next
;
}
}
if
(
start_timer
==
0
)
del_timer
(
&
idle_timer
);
kmem_cache_destroy
(
clip_tbl
.
kmem_cachep
);
/* Now it is safe to fully shutdown whole table. */
neigh_table_clear
(
&
clip_tbl
);
clip_tbl_hook
=
NULL
;
clip_tbl_hook
=
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment