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
3d09274c
Commit
3d09274c
authored
Sep 22, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sctp: Use skb_queue_walk_safe() and skb_queue_split_tail_init().
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
1d4a31dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
include/net/sctp/sctp.h
include/net/sctp/sctp.h
+2
-8
No files found.
include/net/sctp/sctp.h
View file @
3d09274c
...
@@ -406,10 +406,7 @@ struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id);
...
@@ -406,10 +406,7 @@ struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id);
/* A macro to walk a list of skbs. */
/* A macro to walk a list of skbs. */
#define sctp_skb_for_each(pos, head, tmp) \
#define sctp_skb_for_each(pos, head, tmp) \
for (pos = (head)->next;\
skb_queue_walk_safe(head, pos, tmp)
tmp = (pos)->next, pos != ((struct sk_buff *)(head));\
pos = tmp)
/* A helper to append an entire skb list (list) to another (head). */
/* A helper to append an entire skb list (list) to another (head). */
static
inline
void
sctp_skb_list_tail
(
struct
sk_buff_head
*
list
,
static
inline
void
sctp_skb_list_tail
(
struct
sk_buff_head
*
list
,
...
@@ -420,10 +417,7 @@ static inline void sctp_skb_list_tail(struct sk_buff_head *list,
...
@@ -420,10 +417,7 @@ static inline void sctp_skb_list_tail(struct sk_buff_head *list,
sctp_spin_lock_irqsave
(
&
head
->
lock
,
flags
);
sctp_spin_lock_irqsave
(
&
head
->
lock
,
flags
);
sctp_spin_lock
(
&
list
->
lock
);
sctp_spin_lock
(
&
list
->
lock
);
list_splice
((
struct
list_head
*
)
list
,
(
struct
list_head
*
)
head
->
prev
);
skb_queue_splice_tail_init
(
list
,
head
);
head
->
qlen
+=
list
->
qlen
;
list
->
qlen
=
0
;
sctp_spin_unlock
(
&
list
->
lock
);
sctp_spin_unlock
(
&
list
->
lock
);
sctp_spin_unlock_irqrestore
(
&
head
->
lock
,
flags
);
sctp_spin_unlock_irqrestore
(
&
head
->
lock
,
flags
);
...
...
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