Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214375
b: refs/heads/master
c: 3ef13f3
h: refs/heads/master
i:
  214373: 0e21cba
  214371: ba7d588
  214367: 8bd82dc
v: v3
  • Loading branch information
Andy Grover committed Sep 9, 2010
1 parent 3ffd569 commit 71a2170
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e779137aa76d38d5c33a98ed887092ae4e4f016f
refs/heads/master: 3ef13f3c22aaea28aff383cb0883481d24885456
27 changes: 15 additions & 12 deletions trunk/net/rds/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,27 +414,30 @@ void rds_rdma_unuse(struct rds_sock *rs, u32 r_key, int force)

spin_lock_irqsave(&rs->rs_rdma_lock, flags);
mr = rds_mr_tree_walk(&rs->rs_rdma_keys, r_key, NULL);
if (mr && (mr->r_use_once || force)) {
if (!mr) {
printk(KERN_ERR "rds: trying to unuse MR with unknown r_key %u!\n", r_key);
spin_unlock_irqrestore(&rs->rs_rdma_lock, flags);
return;
}

if (mr->r_use_once || force) {
rb_erase(&mr->r_rb_node, &rs->rs_rdma_keys);
RB_CLEAR_NODE(&mr->r_rb_node);
zot_me = 1;
} else if (mr)
atomic_inc(&mr->r_refcount);
}
spin_unlock_irqrestore(&rs->rs_rdma_lock, flags);

/* May have to issue a dma_sync on this memory region.
* Note we could avoid this if the operation was a RDMA READ,
* but at this point we can't tell. */
if (mr) {
if (mr->r_trans->sync_mr)
mr->r_trans->sync_mr(mr->r_trans_private, DMA_FROM_DEVICE);
if (mr->r_trans->sync_mr)
mr->r_trans->sync_mr(mr->r_trans_private, DMA_FROM_DEVICE);

/* If the MR was marked as invalidate, this will
* trigger an async flush. */
if (zot_me)
rds_destroy_mr(mr);
rds_mr_put(mr);
}
/* If the MR was marked as invalidate, this will
* trigger an async flush. */
if (zot_me)
rds_destroy_mr(mr);
rds_mr_put(mr);
}

void rds_rdma_free_op(struct rds_rdma_op *ro)
Expand Down

0 comments on commit 71a2170

Please sign in to comment.