From 688492f366b7f2e1de2c6d5edef2e8d4ed3d8c15 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 21 Nov 2008 16:39:19 -0800 Subject: [PATCH] --- yaml --- r: 121975 b: refs/heads/master c: 7e3aab4a9cd7d37f80eee75bebb6a71347f82476 h: refs/heads/master i: 121973: 1a7a33d1ca8cdfac29bc878482a6f6ced9886f6b 121971: 06487763749dd4a61d6a3666e3ad62bbd851fceb 121967: af21e71583df46c47a22da932d04813364e009ee v: v3 --- [refs] | 2 +- trunk/net/ipv4/inet_diag.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 602864befc00..2aa6ed6ac932 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 176301e82190adb70f9bdf37cd5cb08fcfcb25fb +refs/heads/master: 7e3aab4a9cd7d37f80eee75bebb6a71347f82476 diff --git a/trunk/net/ipv4/inet_diag.c b/trunk/net/ipv4/inet_diag.c index 1cb154ed75ad..998a78f169ff 100644 --- a/trunk/net/ipv4/inet_diag.c +++ b/trunk/net/ipv4/inet_diag.c @@ -778,7 +778,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) for (i = s_i; i < hashinfo->ehash_size; i++) { struct inet_ehash_bucket *head = &hashinfo->ehash[i]; - rwlock_t *lock = inet_ehash_lockp(hashinfo, i); + spinlock_t *lock = inet_ehash_lockp(hashinfo, i); struct sock *sk; struct hlist_nulls_node *node; @@ -791,7 +791,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) if (i > s_i) s_num = 0; - read_lock_bh(lock); + spin_lock_bh(lock); sk_nulls_for_each(sk, node, &head->chain) { struct inet_sock *inet = inet_sk(sk); @@ -806,7 +806,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) r->id.idiag_dport) goto next_normal; if (inet_csk_diag_dump(sk, skb, cb) < 0) { - read_unlock_bh(lock); + spin_unlock_bh(lock); goto done; } next_normal: @@ -828,14 +828,14 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) r->id.idiag_dport) goto next_dying; if (inet_twsk_diag_dump(tw, skb, cb) < 0) { - read_unlock_bh(lock); + spin_unlock_bh(lock); goto done; } next_dying: ++num; } } - read_unlock_bh(lock); + spin_unlock_bh(lock); } done: