diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 016e7c4e366b..5de3243a47c3 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -538,6 +538,9 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport, | |||
538 | continue; | 538 | continue; |
539 | cnt++; | 539 | cnt++; |
540 | if (dd->ipath_pageshadow[porttid + tid]) { | 540 | if (dd->ipath_pageshadow[porttid + tid]) { |
541 | struct page *p; | ||
542 | p = dd->ipath_pageshadow[porttid + tid]; | ||
543 | dd->ipath_pageshadow[porttid + tid] = NULL; | ||
541 | ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n", | 544 | ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n", |
542 | pd->port_pid, tid); | 545 | pd->port_pid, tid); |
543 | dd->ipath_f_put_tid(dd, &tidbase[tid], | 546 | dd->ipath_f_put_tid(dd, &tidbase[tid], |
@@ -546,9 +549,7 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport, | |||
546 | pci_unmap_page(dd->pcidev, | 549 | pci_unmap_page(dd->pcidev, |
547 | dd->ipath_physshadow[porttid + tid], | 550 | dd->ipath_physshadow[porttid + tid], |
548 | PAGE_SIZE, PCI_DMA_FROMDEVICE); | 551 | PAGE_SIZE, PCI_DMA_FROMDEVICE); |
549 | ipath_release_user_pages( | 552 | ipath_release_user_pages(&p, 1); |
550 | &dd->ipath_pageshadow[porttid + tid], 1); | ||
551 | dd->ipath_pageshadow[porttid + tid] = NULL; | ||
552 | ipath_stats.sps_pageunlocks++; | 553 | ipath_stats.sps_pageunlocks++; |
553 | } else | 554 | } else |
554 | ipath_dbg("Unused tid %u, ignoring\n", tid); | 555 | ipath_dbg("Unused tid %u, ignoring\n", tid); |