These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / lustre / lustre / lov / lovsub_dev.c
index 42336f1..8bc04c8 100644 (file)
@@ -56,7 +56,7 @@ static void lovsub_req_completion(const struct lu_env *env,
        struct lovsub_req *lsr;
 
        lsr = cl2lovsub_req(slice);
-       OBD_SLAB_FREE_PTR(lsr, lovsub_req_kmem);
+       kmem_cache_free(lovsub_req_kmem, lsr);
 }
 
 /**
@@ -136,7 +136,7 @@ static struct lu_device *lovsub_device_free(const struct lu_env *env,
                lu_site_print(env, d->ld_site, &msgdata, lu_cdebug_printer);
        }
        cl_device_fini(lu2cl_dev(d));
-       OBD_FREE_PTR(lsd);
+       kfree(lsd);
        return next;
 }
 
@@ -146,7 +146,7 @@ static int lovsub_req_init(const struct lu_env *env, struct cl_device *dev,
        struct lovsub_req *lsr;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lsr, lovsub_req_kmem, GFP_NOFS);
+       lsr = kmem_cache_alloc(lovsub_req_kmem, GFP_NOFS | __GFP_ZERO);
        if (lsr != NULL) {
                cl_req_slice_add(req, &lsr->lsrq_cl, dev, &lovsub_req_ops);
                result = 0;
@@ -172,7 +172,7 @@ static struct lu_device *lovsub_device_alloc(const struct lu_env *env,
        struct lu_device     *d;
        struct lovsub_device *lsd;
 
-       OBD_ALLOC_PTR(lsd);
+       lsd = kzalloc(sizeof(*lsd), GFP_NOFS);
        if (lsd != NULL) {
                int result;
 
@@ -205,5 +205,4 @@ struct lu_device_type lovsub_device_type = {
        .ldt_ctx_tags = LCT_CL_THREAD
 };
 
-
 /** @} lov */