summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-06-23 04:34:47 +0000
committerDavid S. Miller <davem@davemloft.net>2022-06-24 11:34:38 +0100
commitb96ef16d2f837870daaea51c38cd50458b95ad5c (patch)
treeef1ef9daa2a74e594000a2de71f4d2d61486133c /net/ipv6/ip6mr.c
parent194366b28b8306b7a24596c57c09635ab2891252 (diff)
downloadlwn-b96ef16d2f837870daaea51c38cd50458b95ad5c.tar.gz
lwn-b96ef16d2f837870daaea51c38cd50458b95ad5c.zip
ipmr: convert /proc handlers to rcu_read_lock()
We can use standard rcu_read_lock(), to get rid of last read_lock(&mrt_lock) call points. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index f0a9bceb8e3c..7381cfdac3e3 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -404,7 +404,7 @@ static void ip6mr_free_table(struct mr_table *mrt)
*/
static void *ip6mr_vif_seq_start(struct seq_file *seq, loff_t *pos)
- __acquires(mrt_lock)
+ __acquires(RCU)
{
struct mr_vif_iter *iter = seq->private;
struct net *net = seq_file_net(seq);
@@ -416,14 +416,14 @@ static void *ip6mr_vif_seq_start(struct seq_file *seq, loff_t *pos)
iter->mrt = mrt;
- read_lock(&mrt_lock);
+ rcu_read_lock();
return mr_vif_seq_start(seq, pos);
}
static void ip6mr_vif_seq_stop(struct seq_file *seq, void *v)
- __releases(mrt_lock)
+ __releases(RCU)
{
- read_unlock(&mrt_lock);
+ rcu_read_unlock();
}
static int ip6mr_vif_seq_show(struct seq_file *seq, void *v)