diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 18:32:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-10 17:55:09 -0700 |
commit | 6d37b171929a94b41214dfabc65881f60c9da095 (patch) | |
tree | 69d69c58c960554dc43b8460f3a59d1220ea98a6 /drivers/staging/lustre | |
parent | 60ecf96eb24e813fdf24ba2714927b80dc5a83c3 (diff) |
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>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 060b7399e921..2a72427bdd69 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -2463,7 +2463,6 @@ int kiblnd_dev_failover(kib_dev_t *dev) LIST_HEAD(zombie_fpo); struct rdma_cm_id *cmid = NULL; kib_hca_dev_t *hdev = NULL; - kib_hca_dev_t *old; struct ib_pd *pd; kib_net_t *net; 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); - old = dev->ibd_hdev; - dev->ibd_hdev = hdev; /* take over the refcount */ - hdev = old; + swap(dev->ibd_hdev, hdev); /* take over the refcount */ list_for_each_entry(net, &dev->ibd_nets, ibn_list) { cfs_cpt_for_each(i, lnet_cpt_table()) { |