Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvme-multipath: drop head pointer check in nvme_mpath_clear_current_path()

A NS will always have a head pointer, so drop the check. As proof in
practice, all the nvme_mpath_clear_current_path() callers also
dereference ns->head.

This check has endured since the original changes to support multipath.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>

authored by

John Garry and committed by
Keith Busch
7d435caa 7f991e3f

-4
-4
drivers/nvme/host/multipath.c
··· 231 231 bool changed = false; 232 232 int node; 233 233 234 - if (!head) 235 - goto out; 236 - 237 234 for_each_node(node) { 238 235 if (ns == rcu_access_pointer(head->current_path[node])) { 239 236 rcu_assign_pointer(head->current_path[node], NULL); 240 237 changed = true; 241 238 } 242 239 } 243 - out: 244 240 return changed; 245 241 } 246 242