diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-15 21:08:07 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-06-15 21:08:07 -0400 |
commit | 7eef4091a653c243a87e5375c54504cc03bec4d8 (patch) | |
tree | f65b77f830b2c8f7d014512badfef5df0d591ee9 /net/ax25/ax25_uid.c | |
parent | 0a93a47f042c459f0f46942c3a920e3c81878031 (diff) | |
parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) |
Merge commit 'v2.6.30' into for-2.6.31
Diffstat (limited to 'net/ax25/ax25_uid.c')
-rw-r--r-- | net/ax25/ax25_uid.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 57aeba729bae..832bcf092a01 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -148,9 +148,13 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) | |||
148 | { | 148 | { |
149 | struct ax25_uid_assoc *pt; | 149 | struct ax25_uid_assoc *pt; |
150 | struct hlist_node *node; | 150 | struct hlist_node *node; |
151 | int i = 0; | 151 | int i = 1; |
152 | 152 | ||
153 | read_lock(&ax25_uid_lock); | 153 | read_lock(&ax25_uid_lock); |
154 | |||
155 | if (*pos == 0) | ||
156 | return SEQ_START_TOKEN; | ||
157 | |||
154 | ax25_uid_for_each(pt, node, &ax25_uid_list) { | 158 | ax25_uid_for_each(pt, node, &ax25_uid_list) { |
155 | if (i == *pos) | 159 | if (i == *pos) |
156 | return pt; | 160 | return pt; |
@@ -162,8 +166,10 @@ static void *ax25_uid_seq_start(struct seq_file *seq, loff_t *pos) | |||
162 | static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 166 | static void *ax25_uid_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
163 | { | 167 | { |
164 | ++*pos; | 168 | ++*pos; |
165 | 169 | if (v == SEQ_START_TOKEN) | |
166 | return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next, | 170 | return ax25_uid_list.first; |
171 | else | ||
172 | return hlist_entry(((ax25_uid_assoc *)v)->uid_node.next, | ||
167 | ax25_uid_assoc, uid_node); | 173 | ax25_uid_assoc, uid_node); |
168 | } | 174 | } |
169 | 175 | ||