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 @@ -921,9 +921,7 @@ static void fib6_drop_pcpu_from(struct fib6_info *f6i,
921
921
if (pcpu_rt ) {
922
922
struct fib6_info * from ;
923
923
924
- from = rcu_dereference_protected (pcpu_rt -> from ,
925
- lockdep_is_held (& table -> tb6_lock ));
926
- rcu_assign_pointer (pcpu_rt -> from , NULL );
924
+ from = xchg ((__force struct fib6_info * * )& pcpu_rt -> from , NULL );
927
925
fib6_info_release (from );
928
926
}
929
927
}
Original file line number Diff line number Diff line change @@ -379,11 +379,8 @@ static void ip6_dst_destroy(struct dst_entry *dst)
379
379
in6_dev_put (idev );
380
380
}
381
381
382
- rcu_read_lock ();
383
- from = rcu_dereference (rt -> from );
384
- rcu_assign_pointer (rt -> from , NULL );
382
+ from = xchg ((__force struct fib6_info * * )& rt -> from , NULL );
385
383
fib6_info_release (from );
386
- rcu_read_unlock ();
387
384
}
388
385
389
386
static void ip6_dst_ifdown (struct dst_entry * dst , struct net_device * dev ,
@@ -1288,9 +1285,7 @@ static void rt6_remove_exception(struct rt6_exception_bucket *bucket,
1288
1285
/* purge completely the exception to allow releasing the held resources:
1289
1286
* some [sk] cache may keep the dst around for unlimited time
1290
1287
*/
1291
- from = rcu_dereference_protected (rt6_ex -> rt6i -> from ,
1292
- lockdep_is_held (& rt6_exception_lock ));
1293
- rcu_assign_pointer (rt6_ex -> rt6i -> from , NULL );
1288
+ from = xchg ((__force struct fib6_info * * )& rt6_ex -> rt6i -> from , NULL );
1294
1289
fib6_info_release (from );
1295
1290
dst_dev_put (& rt6_ex -> rt6i -> dst );
1296
1291
You can’t perform that action at this time.
0 commit comments