X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdecho%2Fecho.c;h=8563e68eeb4ebecc05841f85ae454408804275d9;hp=ee854f18c9bf1104101ed4b9912faa56d68f5dc4;hb=96c0696453f3aaf5c29a46fd7c6f0bdc25301d71;hpb=b4d3116f44b6613a65ed259bf2f41c1eb41e2ba4 diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index ee854f1..8563e68 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -445,7 +445,7 @@ static int echo_preprw(const struct lu_env *env, int cmd, } } - cfs_atomic_add(*pages, &obd->u.echo.eo_prep); + atomic_add(*pages, &obd->u.echo.eo_prep); if (cmd & OBD_BRW_READ) lprocfs_counter_add(obd->obd_stats, LPROC_ECHO_READ_BYTES, @@ -455,7 +455,7 @@ static int echo_preprw(const struct lu_env *env, int cmd, tot_bytes); CDEBUG(D_PAGE, "%d pages allocated after prep\n", - cfs_atomic_read(&obd->u.echo.eo_prep)); + atomic_read(&obd->u.echo.eo_prep)); RETURN(0); @@ -472,7 +472,7 @@ preprw_cleanup: * lose the extra ref gained above */ OBD_PAGE_FREE(res[i].page); res[i].page = NULL; - cfs_atomic_dec(&obd->u.echo.eo_prep); + atomic_dec(&obd->u.echo.eo_prep); } return rc; @@ -534,14 +534,14 @@ static int echo_commitrw(const struct lu_env *env, int cmd, } - cfs_atomic_sub(pgs, &obd->u.echo.eo_prep); + atomic_sub(pgs, &obd->u.echo.eo_prep); CDEBUG(D_PAGE, "%d pages remain after commit\n", - cfs_atomic_read(&obd->u.echo.eo_prep)); + atomic_read(&obd->u.echo.eo_prep)); RETURN(rc); commitrw_cleanup: - cfs_atomic_sub(pgs, &obd->u.echo.eo_prep); + atomic_sub(pgs, &obd->u.echo.eo_prep); CERROR("cleaning up %d pages (%d obdos)\n", niocount - pgs - 1, objcount); @@ -554,14 +554,15 @@ commitrw_cleanup: /* NB see comment above regarding persistent pages */ OBD_PAGE_FREE(page); - cfs_atomic_dec(&obd->u.echo.eo_prep); + atomic_dec(&obd->u.echo.eo_prep); } return rc; } LPROC_SEQ_FOPS_RO_TYPE(echo, uuid); static struct lprocfs_seq_vars lprocfs_echo_obd_vars[] = { - { "uuid", &echo_uuid_fops }, + { .name = "uuid", + .fops = &echo_uuid_fops }, { 0 } }; @@ -626,7 +627,7 @@ static int echo_cleanup(struct obd_device *obd) ldlm_namespace_free(obd->obd_namespace, NULL, obd->obd_force); obd->obd_namespace = NULL; - leaked = cfs_atomic_read(&obd->u.echo.eo_prep); + leaked = atomic_read(&obd->u.echo.eo_prep); if (leaked != 0) CERROR("%d prep/commitrw pages leaked\n", leaked);