Commit abf9979f authored by Taehee Yoo's avatar Taehee Yoo Committed by David S. Miller

net: netlink: make netlink_walk_start() void return type

netlink_walk_start() needed to return an error code because of
rhashtable_walk_init(). but that was converted to rhashtable_walk_enter()
and it is a void type function. so now netlink_walk_start() doesn't need
any return value.
Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e28799e5
...@@ -2544,12 +2544,10 @@ struct nl_seq_iter { ...@@ -2544,12 +2544,10 @@ struct nl_seq_iter {
int link; int link;
}; };
static int netlink_walk_start(struct nl_seq_iter *iter) static void netlink_walk_start(struct nl_seq_iter *iter)
{ {
rhashtable_walk_enter(&nl_table[iter->link].hash, &iter->hti); rhashtable_walk_enter(&nl_table[iter->link].hash, &iter->hti);
rhashtable_walk_start(&iter->hti); rhashtable_walk_start(&iter->hti);
return 0;
} }
static void netlink_walk_stop(struct nl_seq_iter *iter) static void netlink_walk_stop(struct nl_seq_iter *iter)
...@@ -2565,8 +2563,6 @@ static void *__netlink_seq_next(struct seq_file *seq) ...@@ -2565,8 +2563,6 @@ static void *__netlink_seq_next(struct seq_file *seq)
do { do {
for (;;) { for (;;) {
int err;
nlk = rhashtable_walk_next(&iter->hti); nlk = rhashtable_walk_next(&iter->hti);
if (IS_ERR(nlk)) { if (IS_ERR(nlk)) {
...@@ -2583,9 +2579,7 @@ static void *__netlink_seq_next(struct seq_file *seq) ...@@ -2583,9 +2579,7 @@ static void *__netlink_seq_next(struct seq_file *seq)
if (++iter->link >= MAX_LINKS) if (++iter->link >= MAX_LINKS)
return NULL; return NULL;
err = netlink_walk_start(iter); netlink_walk_start(iter);
if (err)
return ERR_PTR(err);
} }
} while (sock_net(&nlk->sk) != seq_file_net(seq)); } while (sock_net(&nlk->sk) != seq_file_net(seq));
...@@ -2597,13 +2591,10 @@ static void *netlink_seq_start(struct seq_file *seq, loff_t *posp) ...@@ -2597,13 +2591,10 @@ static void *netlink_seq_start(struct seq_file *seq, loff_t *posp)
struct nl_seq_iter *iter = seq->private; struct nl_seq_iter *iter = seq->private;
void *obj = SEQ_START_TOKEN; void *obj = SEQ_START_TOKEN;
loff_t pos; loff_t pos;
int err;
iter->link = 0; iter->link = 0;
err = netlink_walk_start(iter); netlink_walk_start(iter);
if (err)
return ERR_PTR(err);
for (pos = *posp; pos && obj && !IS_ERR(obj); pos--) for (pos = *posp; pos && obj && !IS_ERR(obj); pos--)
obj = __netlink_seq_next(seq); obj = __netlink_seq_next(seq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment