aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/cache.c2
-rw-r--r--net/sunrpc/svc_xprt.c6
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_transport.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 8147e8d56eb2..f39e3e11f9aa 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1358,7 +1358,7 @@ static int c_show(struct seq_file *m, void *p)
1358 ifdebug(CACHE) 1358 ifdebug(CACHE)
1359 seq_printf(m, "# expiry=%ld refcnt=%d flags=%lx\n", 1359 seq_printf(m, "# expiry=%ld refcnt=%d flags=%lx\n",
1360 convert_to_wallclock(cp->expiry_time), 1360 convert_to_wallclock(cp->expiry_time),
1361 atomic_read(&cp->ref.refcount), cp->flags); 1361 kref_read(&cp->ref), cp->flags);
1362 cache_get(cp); 1362 cache_get(cp);
1363 if (cache_check(cd, cp, NULL)) 1363 if (cache_check(cd, cp, NULL))
1364 /* cache_check does a cache_put on failure */ 1364 /* cache_check does a cache_put on failure */
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 3bc1d61694cb..04e7f8707d71 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -490,7 +490,7 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool)
490 svc_xprt_get(xprt); 490 svc_xprt_get(xprt);
491 491
492 dprintk("svc: transport %p dequeued, inuse=%d\n", 492 dprintk("svc: transport %p dequeued, inuse=%d\n",
493 xprt, atomic_read(&xprt->xpt_ref.refcount)); 493 xprt, kref_read(&xprt->xpt_ref));
494 } 494 }
495 spin_unlock_bh(&pool->sp_lock); 495 spin_unlock_bh(&pool->sp_lock);
496out: 496out:
@@ -820,7 +820,7 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
820 /* XPT_DATA|XPT_DEFERRED case: */ 820 /* XPT_DATA|XPT_DEFERRED case: */
821 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n", 821 dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n",
822 rqstp, rqstp->rq_pool->sp_id, xprt, 822 rqstp, rqstp->rq_pool->sp_id, xprt,
823 atomic_read(&xprt->xpt_ref.refcount)); 823 kref_read(&xprt->xpt_ref));
824 rqstp->rq_deferred = svc_deferred_dequeue(xprt); 824 rqstp->rq_deferred = svc_deferred_dequeue(xprt);
825 if (rqstp->rq_deferred) 825 if (rqstp->rq_deferred)
826 len = svc_deferred_recv(rqstp); 826 len = svc_deferred_recv(rqstp);
@@ -978,7 +978,7 @@ static void svc_age_temp_xprts(unsigned long closure)
978 * through, close it. */ 978 * through, close it. */
979 if (!test_and_set_bit(XPT_OLD, &xprt->xpt_flags)) 979 if (!test_and_set_bit(XPT_OLD, &xprt->xpt_flags))
980 continue; 980 continue;
981 if (atomic_read(&xprt->xpt_ref.refcount) > 1 || 981 if (kref_read(&xprt->xpt_ref) > 1 ||
982 test_bit(XPT_BUSY, &xprt->xpt_flags)) 982 test_bit(XPT_BUSY, &xprt->xpt_flags))
983 continue; 983 continue;
984 list_del_init(le); 984 list_del_init(le);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index ca2799af05a6..39652d390a9c 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -1201,9 +1201,9 @@ static void __svc_rdma_free(struct work_struct *work)
1201 ib_drain_qp(rdma->sc_qp); 1201 ib_drain_qp(rdma->sc_qp);
1202 1202
1203 /* We should only be called from kref_put */ 1203 /* We should only be called from kref_put */
1204 if (atomic_read(&xprt->xpt_ref.refcount) != 0) 1204 if (kref_read(&xprt->xpt_ref) != 0)
1205 pr_err("svcrdma: sc_xprt still in use? (%d)\n", 1205 pr_err("svcrdma: sc_xprt still in use? (%d)\n",
1206 atomic_read(&xprt->xpt_ref.refcount)); 1206 kref_read(&xprt->xpt_ref));
1207 1207
1208 /* 1208 /*
1209 * Destroy queued, but not processed read completions. Note 1209 * Destroy queued, but not processed read completions. Note