X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog_osd.c;h=70aa4c4f59cf62df132026b360440cf7978a2ae5;hb=1ccdab699584306383dc21ff2c0f48bce70f6660;hp=80904c51532d70371ff7de2bf3969e6e7c79390d;hpb=6c37a25e0084143a2c5e00f765a084306df90167;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/llog_osd.c b/lustre/obdclass/llog_osd.c index 80904c5..70aa4c4 100644 --- a/lustre/obdclass/llog_osd.c +++ b/lustre/obdclass/llog_osd.c @@ -27,7 +27,7 @@ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel, Inc. + * Copyright (c) 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -434,15 +434,15 @@ static int llog_osd_write_rec(const struct lu_env *env, /* The caller should make sure only 1 process access the lgh_last_idx, * Otherwise it might hit the assert.*/ LASSERT(index < LLOG_BITMAP_SIZE(llh)); - cfs_spin_lock(&loghandle->lgh_hdr_lock); + spin_lock(&loghandle->lgh_hdr_lock); if (ext2_set_bit(index, llh->llh_bitmap)) { CERROR("%s: index %u already set in log bitmap\n", o->do_lu.lo_dev->ld_obd->obd_name, index); - cfs_spin_unlock(&loghandle->lgh_hdr_lock); + spin_unlock(&loghandle->lgh_hdr_lock); LBUG(); /* should never happen */ } llh->llh_count++; - cfs_spin_unlock(&loghandle->lgh_hdr_lock); + spin_unlock(&loghandle->lgh_hdr_lock); llh->llh_tail.lrt_index = index; lgi->lgi_off = 0; @@ -777,9 +777,9 @@ static int llog_osd_open(const struct lu_env *env, struct llog_handle *handle, if (IS_ERR(ls)) RETURN(PTR_ERR(ls)); - cfs_mutex_lock(&ls->ls_los_mutex); + mutex_lock(&ls->ls_los_mutex); los = dt_los_find(ls, FID_SEQ_LLOG); - cfs_mutex_unlock(&ls->ls_los_mutex); + mutex_unlock(&ls->ls_los_mutex); LASSERT(los); ls_device_put(env, ls); @@ -1107,9 +1107,9 @@ static int llog_osd_cleanup(const struct lu_env *env, struct llog_ctxt *ctxt) if (IS_ERR(ls)) RETURN(PTR_ERR(ls)); - cfs_mutex_lock(&ls->ls_los_mutex); + mutex_lock(&ls->ls_los_mutex); los = dt_los_find(ls, FID_SEQ_LLOG); - cfs_mutex_unlock(&ls->ls_los_mutex); + mutex_unlock(&ls->ls_los_mutex); if (los != NULL) { dt_los_put(los); local_oid_storage_fini(env, los); @@ -1152,6 +1152,7 @@ int llog_osd_get_cat_list(const struct lu_env *env, struct dt_device *d, lgi->lgi_off = idx * sizeof(*idarray); lu_local_obj_fid(&lgi->lgi_fid, LLOG_CATALOGS_OID); + o = dt_locate(env, d, &lgi->lgi_fid); if (IS_ERR(o)) RETURN(PTR_ERR(o)); @@ -1246,6 +1247,7 @@ int llog_osd_put_cat_list(const struct lu_env *env, struct dt_device *d, lgi->lgi_off = idx * sizeof(*idarray); lu_local_obj_fid(&lgi->lgi_fid, LLOG_CATALOGS_OID); + o = dt_locate(env, d, &lgi->lgi_fid); if (IS_ERR(o)) RETURN(PTR_ERR(o));