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>
This commit is contained in:
Ka-Cheong Poon
2020-04-08 03:21:01 -07:00
committed by David S. Miller
parent 022e9d6090
commit e228a5d05e
3 changed files with 20 additions and 23 deletions

View File

@@ -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)
{