2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00

staging: lustre: lnet: o2iblnd: use swap() in kiblnd_dev_failover()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Fabian Frederick 2015-06-10 18:32:21 +02:00 committed by Greg Kroah-Hartman
parent 60ecf96eb2
commit 6d37b17192

View File

@ -2463,7 +2463,6 @@ int kiblnd_dev_failover(kib_dev_t *dev)
LIST_HEAD(zombie_fpo); LIST_HEAD(zombie_fpo);
struct rdma_cm_id *cmid = NULL; struct rdma_cm_id *cmid = NULL;
kib_hca_dev_t *hdev = NULL; kib_hca_dev_t *hdev = NULL;
kib_hca_dev_t *old;
struct ib_pd *pd; struct ib_pd *pd;
kib_net_t *net; kib_net_t *net;
struct sockaddr_in addr; struct sockaddr_in addr;
@ -2555,9 +2554,7 @@ int kiblnd_dev_failover(kib_dev_t *dev)
write_lock_irqsave(&kiblnd_data.kib_global_lock, flags); write_lock_irqsave(&kiblnd_data.kib_global_lock, flags);
old = dev->ibd_hdev; swap(dev->ibd_hdev, hdev); /* take over the refcount */
dev->ibd_hdev = hdev; /* take over the refcount */
hdev = old;
list_for_each_entry(net, &dev->ibd_nets, ibn_list) { list_for_each_entry(net, &dev->ibd_nets, ibn_list) {
cfs_cpt_for_each(i, lnet_cpt_table()) { cfs_cpt_for_each(i, lnet_cpt_table()) {