xfrm: state: simplify rcu_read_unlock handling in two spots
authorFlorian Westphal <fw@strlen.de>
Mon, 9 Jan 2017 13:20:49 +0000 (14:20 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 10 Jan 2017 09:57:14 +0000 (10:57 +0100)
commit75cda62d9ca2cd3fab0412d438fcd1bfa0580b3d
tree8440ffce5bf5161b762fa15be57e019cfb4917c8
parent711059b9752ad09ae6bcd4be8e48d30e5db483d8
xfrm: state: simplify rcu_read_unlock handling in two spots

Instead of:
  if (foo) {
      unlock();
      return bar();
   }
   unlock();
do:
   unlock();
   if (foo)
       return bar();

This is ok because rcu protected structure is only dereferenced before
the conditional.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c