summaryrefslogtreecommitdiffstats
path: root/net/rds/rds.h
diff options
context:
space:
mode:
authorKa-Cheong Poon <ka-cheong.poon@oracle.com>2020-04-08 03:21:01 -0700
committerDavid S. Miller <davem@davemloft.net>2020-04-09 10:22:00 -0700
commite228a5d05e9ee25878e9a40de96e7ceb579d4893 (patch)
tree2ab89c5049f76c3763cdd5db0f4faec52375b17f /net/rds/rds.h
parent022e9d6090599c0593c78e87dc9ba98a290e6bc4 (diff)
downloadlinux-e228a5d05e9ee25878e9a40de96e7ceb579d4893.tar.gz
linux-e228a5d05e9ee25878e9a40de96e7ceb579d4893.tar.bz2
linux-e228a5d05e9ee25878e9a40de96e7ceb579d4893.zip
net/rds: Replace struct rds_mr's r_refcount with struct kref
And removed rds_mr_put(). Signed-off-by: Ka-Cheong Poon <ka-cheong.poon@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r--net/rds/rds.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h
index e4a603523083..3cda01cfaa56 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -291,7 +291,7 @@ struct rds_incoming {
struct rds_mr {
struct rb_node r_rb_node;
- refcount_t r_refcount;
+ struct kref r_kref;
u32 r_key;
/* A copy of the creation flags */
@@ -946,12 +946,7 @@ void rds_atomic_send_complete(struct rds_message *rm, int wc_status);
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm,
struct cmsghdr *cmsg);
-void __rds_put_mr_final(struct rds_mr *mr);
-static inline void rds_mr_put(struct rds_mr *mr)
-{
- if (refcount_dec_and_test(&mr->r_refcount))
- __rds_put_mr_final(mr);
-}
+void __rds_put_mr_final(struct kref *kref);
static inline bool rds_destroy_pending(struct rds_connection *conn)
{