File tree 2 files changed +3
-10
lines changed 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -889,9 +889,7 @@ static void fib6_drop_pcpu_from(struct fib6_info *f6i,
889
889
if (pcpu_rt ) {
890
890
struct fib6_info * from ;
891
891
892
- from = rcu_dereference_protected (pcpu_rt -> from ,
893
- lockdep_is_held (& table -> tb6_lock ));
894
- rcu_assign_pointer (pcpu_rt -> from , NULL );
892
+ from = xchg ((__force struct fib6_info * * )& pcpu_rt -> from , NULL );
895
893
fib6_info_release (from );
896
894
}
897
895
}
Original file line number Diff line number Diff line change @@ -382,11 +382,8 @@ static void ip6_dst_destroy(struct dst_entry *dst)
382
382
in6_dev_put (idev );
383
383
}
384
384
385
- rcu_read_lock ();
386
- from = rcu_dereference (rt -> from );
387
- rcu_assign_pointer (rt -> from , NULL );
385
+ from = xchg ((__force struct fib6_info * * )& rt -> from , NULL );
388
386
fib6_info_release (from );
389
- rcu_read_unlock ();
390
387
}
391
388
392
389
static void ip6_dst_ifdown (struct dst_entry * dst , struct net_device * dev ,
@@ -1296,9 +1293,7 @@ static void rt6_remove_exception(struct rt6_exception_bucket *bucket,
1296
1293
/* purge completely the exception to allow releasing the held resources:
1297
1294
* some [sk] cache may keep the dst around for unlimited time
1298
1295
*/
1299
- from = rcu_dereference_protected (rt6_ex -> rt6i -> from ,
1300
- lockdep_is_held (& rt6_exception_lock ));
1301
- rcu_assign_pointer (rt6_ex -> rt6i -> from , NULL );
1296
+ from = xchg ((__force struct fib6_info * * )& rt6_ex -> rt6i -> from , NULL );
1302
1297
fib6_info_release (from );
1303
1298
dst_dev_put (& rt6_ex -> rt6i -> dst );
1304
1299
You can’t perform that action at this time.
0 commit comments