diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2023-06-12 10:13:45 -0400 |
|---|---|---|
| committer | Chuck Lever <chuck.lever@oracle.com> | 2023-06-17 13:18:06 -0400 |
| commit | 91f8ce28466e480fd9ef27e028ac89dbfd264c24 (patch) | |
| tree | c5b16ef8c6f67a6fd03496e93de6449cf7bc7e31 /net/sunrpc/xprtrdma/svc_rdma_rw.c | |
| parent | NFSD: Add an nfsd4_encode_nfstime4() helper (diff) | |
| download | linux-91f8ce28466e480fd9ef27e028ac89dbfd264c24.tar.gz linux-91f8ce28466e480fd9ef27e028ac89dbfd264c24.zip | |
svcrdma: Convert "might sleep" comment into a code annotation
Try to catch incorrect calling contexts mechanically rather than by
code review.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_rw.c')
| -rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_rw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 068c365e7812..59ea87b5f458 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -353,8 +353,7 @@ static void svc_rdma_wc_read_done(struct ib_cq *cq, struct ib_wc *wc) return; } -/* This function sleeps when the transport's Send Queue is congested. - * +/* * Assumptions: * - If ib_post_send() succeeds, only one completion is expected, * even if one or more WRs are flushed. This is true when posting @@ -369,6 +368,8 @@ static int svc_rdma_post_chunk_ctxt(struct svc_rdma_chunk_ctxt *cc) struct ib_cqe *cqe; int ret; + might_sleep(); + if (cc->cc_sqecount > rdma->sc_sq_depth) return -EINVAL; |
