diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_io.c')
-rw-r--r-- | drivers/staging/lustre/lustre/osc/osc_io.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index fa24e9ed1831..d413496c0f63 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -78,7 +78,6 @@ static struct osc_page *osc_cl_page_osc(struct cl_page *page) return cl2osc_page(slice); } - /***************************************************************************** * * io operations. @@ -402,7 +401,7 @@ static int osc_io_setattr_start(const struct lu_env *env, __u64 size = io->u.ci_setattr.sa_attr.lvb_size; unsigned int ia_valid = io->u.ci_setattr.sa_valid; int result = 0; - struct obd_info oinfo = { { { 0 } } }; + struct obd_info oinfo = { }; /* truncate cache dirty pages first */ if (cl_io_is_trunc(io)) @@ -457,7 +456,6 @@ static int osc_io_setattr_start(const struct lu_env *env, } oinfo.oi_oa = oa; - oinfo.oi_capa = io->u.ci_setattr.sa_capa; init_completion(&cbargs->opc_sync); if (ia_valid & ATTR_SIZE) @@ -518,7 +516,7 @@ static int osc_io_read_start(const struct lu_env *env, if (!slice->cis_io->ci_noatime) { cl_object_attr_lock(obj); - attr->cat_atime = LTIME_S(CURRENT_TIME); + attr->cat_atime = ktime_get_real_seconds(); rc = cl_object_attr_set(env, obj, attr, CAT_ATIME); cl_object_attr_unlock(obj); } @@ -534,7 +532,7 @@ static int osc_io_write_start(const struct lu_env *env, OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_SETTIME, 1); cl_object_attr_lock(obj); - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); rc = cl_object_attr_set(env, obj, attr, CAT_MTIME | CAT_CTIME); cl_object_attr_unlock(obj); @@ -564,7 +562,6 @@ static int osc_fsync_ost(const struct lu_env *env, struct osc_object *obj, memset(oinfo, 0, sizeof(*oinfo)); oinfo->oi_oa = oa; - oinfo->oi_capa = fio->fi_capa; init_completion(&cbargs->opc_sync); rc = osc_sync_base(osc_export(obj), oinfo, osc_async_upcall, cbargs, @@ -703,7 +700,7 @@ static void osc_req_completion(const struct lu_env *env, struct osc_req *or; or = cl2osc_req(slice); - OBD_SLAB_FREE_PTR(or, osc_req_kmem); + kmem_cache_free(osc_req_kmem, or); } /** @@ -790,7 +787,6 @@ static const struct cl_req_operations osc_req_ops = { .cro_completion = osc_req_completion }; - int osc_io_init(const struct lu_env *env, struct cl_object *obj, struct cl_io *io) { @@ -807,7 +803,7 @@ int osc_req_init(const struct lu_env *env, struct cl_device *dev, struct osc_req *or; int result; - OBD_SLAB_ALLOC_PTR_GFP(or, osc_req_kmem, GFP_NOFS); + or = kmem_cache_alloc(osc_req_kmem, GFP_NOFS | __GFP_ZERO); if (or != NULL) { cl_req_slice_add(req, &or->or_cl, dev, &osc_req_ops); result = 0; |