File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4304,7 +4304,7 @@ static void nvme_ns_remove(struct nvme_ns *ns)
4304
4304
mutex_unlock (& ns -> ctrl -> subsys -> lock );
4305
4305
4306
4306
/* guarantee not available in head->list */
4307
- synchronize_rcu ( );
4307
+ synchronize_srcu ( & ns -> head -> srcu );
4308
4308
4309
4309
if (!nvme_ns_head_multipath (ns -> head ))
4310
4310
nvme_cdev_del (& ns -> cdev , & ns -> cdev_device );
Original file line number Diff line number Diff line change @@ -174,11 +174,14 @@ void nvme_mpath_revalidate_paths(struct nvme_ns *ns)
174
174
struct nvme_ns_head * head = ns -> head ;
175
175
sector_t capacity = get_capacity (head -> disk );
176
176
int node ;
177
+ int srcu_idx ;
177
178
179
+ srcu_idx = srcu_read_lock (& head -> srcu );
178
180
list_for_each_entry_rcu (ns , & head -> list , siblings ) {
179
181
if (capacity != get_capacity (ns -> disk ))
180
182
clear_bit (NVME_NS_READY , & ns -> flags );
181
183
}
184
+ srcu_read_unlock (& head -> srcu , srcu_idx );
182
185
183
186
for_each_node (node )
184
187
rcu_assign_pointer (head -> current_path [node ], NULL );
You can’t perform that action at this time.
0 commit comments