X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosc%2Fosc_object.c;h=77a4a69c11ed1f164db257420813c2a65505b949;hb=9461ed3fff67d81a9de08653fdb6975db8b76be3;hp=91e37987323196f088a67becdd6750e992735409;hpb=0a259bd7dbac76d75b89a389bc317720153aa452;p=fs%2Flustre-release.git diff --git a/lustre/osc/osc_object.c b/lustre/osc/osc_object.c index 91e3798..77a4a69 100644 --- a/lustre/osc/osc_object.c +++ b/lustre/osc/osc_object.c @@ -95,8 +95,8 @@ static int osc_object_init(const struct lu_env *env, struct lu_object *obj, CFS_INIT_LIST_HEAD(&osc->oo_urgent_exts); CFS_INIT_LIST_HEAD(&osc->oo_rpc_exts); CFS_INIT_LIST_HEAD(&osc->oo_reading_exts); - cfs_atomic_set(&osc->oo_nr_reads, 0); - cfs_atomic_set(&osc->oo_nr_writes, 0); + atomic_set(&osc->oo_nr_reads, 0); + atomic_set(&osc->oo_nr_writes, 0); spin_lock_init(&osc->oo_lock); spin_lock_init(&osc->oo_tree_lock); @@ -123,8 +123,8 @@ static void osc_object_free(const struct lu_env *env, struct lu_object *obj) LASSERT(cfs_list_empty(&osc->oo_urgent_exts)); LASSERT(cfs_list_empty(&osc->oo_rpc_exts)); LASSERT(cfs_list_empty(&osc->oo_reading_exts)); - LASSERT(cfs_atomic_read(&osc->oo_nr_reads) == 0); - LASSERT(cfs_atomic_read(&osc->oo_nr_writes) == 0); + LASSERT(atomic_read(&osc->oo_nr_reads) == 0); + LASSERT(atomic_read(&osc->oo_nr_writes) == 0); lu_object_fini(obj); OBD_SLAB_FREE_PTR(osc, osc_object_kmem); @@ -260,21 +260,21 @@ static const struct lu_object_operations osc_lu_obj_ops = { }; struct lu_object *osc_object_alloc(const struct lu_env *env, - const struct lu_object_header *unused, - struct lu_device *dev) + const struct lu_object_header *unused, + struct lu_device *dev) { - struct osc_object *osc; - struct lu_object *obj; - - OBD_SLAB_ALLOC_PTR_GFP(osc, osc_object_kmem, __GFP_IO); - if (osc != NULL) { - obj = osc2lu(osc); - lu_object_init(obj, NULL, dev); - osc->oo_cl.co_ops = &osc_ops; - obj->lo_ops = &osc_lu_obj_ops; - } else - obj = NULL; - return obj; + struct osc_object *osc; + struct lu_object *obj; + + OBD_SLAB_ALLOC_PTR_GFP(osc, osc_object_kmem, GFP_NOFS); + if (osc != NULL) { + obj = osc2lu(osc); + lu_object_init(obj, NULL, dev); + osc->oo_cl.co_ops = &osc_ops; + obj->lo_ops = &osc_lu_obj_ops; + } else + obj = NULL; + return obj; } /** @} osc */