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
nexedi
linux
Commits
a1e033b0
Commit
a1e033b0
authored
Jul 12, 2002
by
Ravikiran G. Thirumalai
Committed by
David S. Miller
Jul 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/core/dst.c: dst_total only needs to exist if RT_CACHE_DEBUG >= 2
parent
6a63a888
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
net/core/dst.c
net/core/dst.c
+6
-0
No files found.
net/core/dst.c
View file @
a1e033b0
...
@@ -29,7 +29,9 @@
...
@@ -29,7 +29,9 @@
* 4) All operations modify state, so a spinlock is used.
* 4) All operations modify state, so a spinlock is used.
*/
*/
static
struct
dst_entry
*
dst_garbage_list
;
static
struct
dst_entry
*
dst_garbage_list
;
#if RT_CACHE_DEBUG >= 2
static
atomic_t
dst_total
=
ATOMIC_INIT
(
0
);
static
atomic_t
dst_total
=
ATOMIC_INIT
(
0
);
#endif
static
spinlock_t
dst_lock
=
SPIN_LOCK_UNLOCKED
;
static
spinlock_t
dst_lock
=
SPIN_LOCK_UNLOCKED
;
static
unsigned
long
dst_gc_timer_expires
;
static
unsigned
long
dst_gc_timer_expires
;
...
@@ -108,7 +110,9 @@ void * dst_alloc(struct dst_ops * ops)
...
@@ -108,7 +110,9 @@ void * dst_alloc(struct dst_ops * ops)
dst
->
lastuse
=
jiffies
;
dst
->
lastuse
=
jiffies
;
dst
->
input
=
dst_discard
;
dst
->
input
=
dst_discard
;
dst
->
output
=
dst_blackhole
;
dst
->
output
=
dst_blackhole
;
#if RT_CACHE_DEBUG >= 2
atomic_inc
(
&
dst_total
);
atomic_inc
(
&
dst_total
);
#endif
atomic_inc
(
&
ops
->
entries
);
atomic_inc
(
&
ops
->
entries
);
return
dst
;
return
dst
;
}
}
...
@@ -158,7 +162,9 @@ void dst_destroy(struct dst_entry * dst)
...
@@ -158,7 +162,9 @@ void dst_destroy(struct dst_entry * dst)
dst
->
ops
->
destroy
(
dst
);
dst
->
ops
->
destroy
(
dst
);
if
(
dst
->
dev
)
if
(
dst
->
dev
)
dev_put
(
dst
->
dev
);
dev_put
(
dst
->
dev
);
#if RT_CACHE_DEBUG >= 2
atomic_dec
(
&
dst_total
);
atomic_dec
(
&
dst_total
);
#endif
kmem_cache_free
(
dst
->
ops
->
kmem_cachep
,
dst
);
kmem_cache_free
(
dst
->
ops
->
kmem_cachep
,
dst
);
}
}
...
...
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