linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cleanup: no need to call rcu_lock in sock_update_classid()
@ 2011-09-06  2:35 Glauber Costa
  2011-09-08 17:26 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Glauber Costa @ 2011-09-06  2:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: Glauber Costa, Paul E. McKenney, Li Zefan, David S. Miller

There is no need to protect

According to the all-knowing git log, this was inserted here to prevent a
warning in commit 1144182a. But 3fb5a991 also does that in a different place.
>From reading it, I believe they are fixing the same warning, so no need
for both.

Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: David S. Miller <davem@davemloft.net>
---
 net/core/sock.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index bc745d0..3449df8 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1107,9 +1107,7 @@ void sock_update_classid(struct sock *sk)
 {
 	u32 classid;
 
-	rcu_read_lock();  /* doing current task, which cannot vanish. */
 	classid = task_cls_classid(current);
-	rcu_read_unlock();
 	if (classid && classid != sk->sk_classid)
 		sk->sk_classid = classid;
 }
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-09  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06  2:35 [PATCH] cleanup: no need to call rcu_lock in sock_update_classid() Glauber Costa
2011-09-08 17:26 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).