]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
proc: don't do dummy rcu_read_lock/rcu_read_unlock on error path
authorAlexey Dobriyan <adobriyan@gmail.com>
Thu, 31 May 2012 23:26:18 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jun 2012 00:49:29 +0000 (17:49 -0700)
commitf05ed3f1abefd37c08fbf08c766d2abd40607777
treef938f73f6f3ee4bab88ada21212371cd023eca63
parent2344bec788b097b2d1198758bd29c583812b864e
proc: don't do dummy rcu_read_lock/rcu_read_unlock on error path

rcu_read_lock()/rcu_read_unlock() is nop for TINY_RCU, but is not a nop
for, say, PREEMPT_RCU.

proc_fill_cache() is called without RCU lock, there is no need to
lock/unlock on error path, simply jump out of the loop.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/base.c