|
@@ -45,7 +45,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- atomic_set(&inc->i_refcount, 1);
|
|
|
|
|
|
+ refcount_set(&inc->i_refcount, 1);
|
|
INIT_LIST_HEAD(&inc->i_item);
|
|
INIT_LIST_HEAD(&inc->i_item);
|
|
inc->i_conn = conn;
|
|
inc->i_conn = conn;
|
|
inc->i_saddr = saddr;
|
|
inc->i_saddr = saddr;
|
|
@@ -61,7 +61,7 @@ EXPORT_SYMBOL_GPL(rds_inc_init);
|
|
void rds_inc_path_init(struct rds_incoming *inc, struct rds_conn_path *cp,
|
|
void rds_inc_path_init(struct rds_incoming *inc, struct rds_conn_path *cp,
|
|
__be32 saddr)
|
|
__be32 saddr)
|
|
{
|
|
{
|
|
- atomic_set(&inc->i_refcount, 1);
|
|
|
|
|
|
+ refcount_set(&inc->i_refcount, 1);
|
|
INIT_LIST_HEAD(&inc->i_item);
|
|
INIT_LIST_HEAD(&inc->i_item);
|
|
inc->i_conn = cp->cp_conn;
|
|
inc->i_conn = cp->cp_conn;
|
|
inc->i_conn_path = cp;
|
|
inc->i_conn_path = cp;
|
|
@@ -74,14 +74,14 @@ EXPORT_SYMBOL_GPL(rds_inc_path_init);
|
|
|
|
|
|
static void rds_inc_addref(struct rds_incoming *inc)
|
|
static void rds_inc_addref(struct rds_incoming *inc)
|
|
{
|
|
{
|
|
- rdsdebug("addref inc %p ref %d\n", inc, atomic_read(&inc->i_refcount));
|
|
|
|
- atomic_inc(&inc->i_refcount);
|
|
|
|
|
|
+ rdsdebug("addref inc %p ref %d\n", inc, refcount_read(&inc->i_refcount));
|
|
|
|
+ refcount_inc(&inc->i_refcount);
|
|
}
|
|
}
|
|
|
|
|
|
void rds_inc_put(struct rds_incoming *inc)
|
|
void rds_inc_put(struct rds_incoming *inc)
|
|
{
|
|
{
|
|
- rdsdebug("put inc %p ref %d\n", inc, atomic_read(&inc->i_refcount));
|
|
|
|
- if (atomic_dec_and_test(&inc->i_refcount)) {
|
|
|
|
|
|
+ rdsdebug("put inc %p ref %d\n", inc, refcount_read(&inc->i_refcount));
|
|
|
|
+ if (refcount_dec_and_test(&inc->i_refcount)) {
|
|
BUG_ON(!list_empty(&inc->i_item));
|
|
BUG_ON(!list_empty(&inc->i_item));
|
|
|
|
|
|
inc->i_conn->c_trans->inc_free(inc);
|
|
inc->i_conn->c_trans->inc_free(inc);
|