Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97119
b: refs/heads/master
c: 8da91ea
h: refs/heads/master
i:
  97117: 6f236e0
  97115: edfd98c
  97111: e7a7d22
  97103: ff56426
  97087: 6400b82
v: v3
  • Loading branch information
Tom Tucker committed May 19, 2008
1 parent a35cd54 commit 42f37d4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 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: 47698e083e40bbd3ef87f5561390ae33abb13cd0
refs/heads/master: 8da91ea8de873ee8be82377ff18637d05e882058
1 change: 1 addition & 0 deletions trunk/include/linux/sunrpc/svc_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ struct svcxprt_rdma {
struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */
struct list_head sc_read_complete_q;
spinlock_t sc_read_complete_lock;
struct work_struct sc_work;
};
/* sc_flags */
#define RDMAXPRT_RQ_PENDING 1
Expand Down
17 changes: 14 additions & 3 deletions trunk/net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,12 +963,15 @@ static void svc_rdma_detach(struct svc_xprt *xprt)
rdma_destroy_id(rdma->sc_cm_id);
}

static void svc_rdma_free(struct svc_xprt *xprt)
static void __svc_rdma_free(struct work_struct *work)
{
struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt;
struct svcxprt_rdma *rdma =
container_of(work, struct svcxprt_rdma, sc_work);
dprintk("svcrdma: svc_rdma_free(%p)\n", rdma);

/* We should only be called from kref_put */
BUG_ON(atomic_read(&xprt->xpt_ref.refcount) != 0);
BUG_ON(atomic_read(&rdma->sc_xprt.xpt_ref.refcount) != 0);

if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq))
ib_destroy_cq(rdma->sc_sq_cq);

Expand All @@ -985,6 +988,14 @@ static void svc_rdma_free(struct svc_xprt *xprt)
kfree(rdma);
}

static void svc_rdma_free(struct svc_xprt *xprt)
{
struct svcxprt_rdma *rdma =
container_of(xprt, struct svcxprt_rdma, sc_xprt);
INIT_WORK(&rdma->sc_work, __svc_rdma_free);
schedule_work(&rdma->sc_work);
}

static int svc_rdma_has_wspace(struct svc_xprt *xprt)
{
struct svcxprt_rdma *rdma =
Expand Down

0 comments on commit 42f37d4

Please sign in to comment.