File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -249,9 +249,10 @@ struct device_type part_type = {
249
249
.uevent = part_uevent ,
250
250
};
251
251
252
- static void delete_partition_rcu_cb (struct rcu_head * head )
252
+ static void delete_partition_work_fn (struct work_struct * work )
253
253
{
254
- struct hd_struct * part = container_of (head , struct hd_struct , rcu_head );
254
+ struct hd_struct * part = container_of (to_rcu_work (work ), struct hd_struct ,
255
+ rcu_work );
255
256
256
257
part -> start_sect = 0 ;
257
258
part -> nr_sects = 0 ;
@@ -262,7 +263,8 @@ static void delete_partition_rcu_cb(struct rcu_head *head)
262
263
void __delete_partition (struct percpu_ref * ref )
263
264
{
264
265
struct hd_struct * part = container_of (ref , struct hd_struct , ref );
265
- call_rcu (& part -> rcu_head , delete_partition_rcu_cb );
266
+ INIT_RCU_WORK (& part -> rcu_work , delete_partition_work_fn );
267
+ queue_rcu_work (system_wq , & part -> rcu_work );
266
268
}
267
269
268
270
/*
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ struct hd_struct {
129
129
struct disk_stats dkstats ;
130
130
#endif
131
131
struct percpu_ref ref ;
132
- struct rcu_head rcu_head ;
132
+ struct rcu_work rcu_work ;
133
133
};
134
134
135
135
#define GENHD_FL_REMOVABLE 1
You can’t perform that action at this time.
0 commit comments