aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>2011-12-02 12:41:30 -0500
committerRoland Dreier <roland@purestorage.com>2011-12-19 12:19:34 -0500
commit29d1b16145e78e0f4af54751965c4a09e83bd872 (patch)
tree506014cf176583d3354e953128ceca1c509cc15c /drivers/infiniband/hw/qib
parent5611cc4572e889b62a7b4c72a413536bf6a9c416 (diff)
IB/qib: Correct sense on freectxts increment and decrement
Commit 53ab1c64983 ("IB/qib: Correct nfreectxts for multiple HCAs") reversed the increments and decrements of dd->nfreectxts. Fix it. Reviewed-by: Ram Vepa <ram.vepa@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib')
-rw-r--r--drivers/infiniband/hw/qib/qib_file_ops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 574600ef5b42..a7403248d83d 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1285,7 +1285,7 @@ static int setup_ctxt(struct qib_pportdata *ppd, int ctxt,
1285 strlcpy(rcd->comm, current->comm, sizeof(rcd->comm)); 1285 strlcpy(rcd->comm, current->comm, sizeof(rcd->comm));
1286 ctxt_fp(fp) = rcd; 1286 ctxt_fp(fp) = rcd;
1287 qib_stats.sps_ctxts++; 1287 qib_stats.sps_ctxts++;
1288 dd->freectxts++; 1288 dd->freectxts--;
1289 ret = 0; 1289 ret = 0;
1290 goto bail; 1290 goto bail;
1291 1291
@@ -1794,7 +1794,7 @@ static int qib_close(struct inode *in, struct file *fp)
1794 if (dd->pageshadow) 1794 if (dd->pageshadow)
1795 unlock_expected_tids(rcd); 1795 unlock_expected_tids(rcd);
1796 qib_stats.sps_ctxts--; 1796 qib_stats.sps_ctxts--;
1797 dd->freectxts--; 1797 dd->freectxts++;
1798 } 1798 }
1799 1799
1800 mutex_unlock(&qib_mutex); 1800 mutex_unlock(&qib_mutex);