Skip to content

Commit

Permalink
sctp: remove useless start_fail from sctp_ht_iter in proc
Browse files Browse the repository at this point in the history
After changing rhashtable_walk_start to return void, start_fail would
never be set other value than 0, and the checking for start_fail is
pointless, so remove it.

Fixes: 97a6ec4 ("rhashtable: Change rhashtable_walk_start to return void")
Signed-off-by: Xin Long <[email protected]>
Acked-by: Neil Horman <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Aug 27, 2018
1 parent bab1be7 commit 834539e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/sctp/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ static const struct seq_operations sctp_eps_ops = {
struct sctp_ht_iter {
struct seq_net_private p;
struct rhashtable_iter hti;
int start_fail;
};

static void *sctp_transport_seq_start(struct seq_file *seq, loff_t *pos)
Expand All @@ -224,16 +223,13 @@ static void *sctp_transport_seq_start(struct seq_file *seq, loff_t *pos)

sctp_transport_walk_start(&iter->hti);

iter->start_fail = 0;
return sctp_transport_get_idx(seq_file_net(seq), &iter->hti, *pos);
}

static void sctp_transport_seq_stop(struct seq_file *seq, void *v)
{
struct sctp_ht_iter *iter = seq->private;

if (iter->start_fail)
return;
sctp_transport_walk_stop(&iter->hti);
}

Expand Down

0 comments on commit 834539e

Please sign in to comment.