staging/lustre/llite: Get rid of OBD_ALLOC/FREE_PTR
authorOleg Drokin <green@linuxhacker.ru>
Wed, 16 Sep 2015 16:26:56 +0000 (12:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2015 03:32:10 +0000 (20:32 -0700)
The remaining users in ll_open_cleanup and obd_mod_alloc
are converted to regular kzalloc/kfree.

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/llite/llite_lib.c

index 76a2546e0f41e504fc168af5a56a8d99163dd670..145c9be8fc5dd253e9a6215b83163b35d04b8978 100644 (file)
@@ -1408,7 +1408,7 @@ static inline struct md_open_data *obd_mod_alloc(void)
 {
        struct md_open_data *mod;
 
-       OBD_ALLOC_PTR(mod);
+       mod = kzalloc(sizeof(*mod), GFP_NOFS);
        if (mod == NULL)
                return NULL;
        atomic_set(&mod->mod_refcount, 1);
@@ -1421,7 +1421,7 @@ static inline struct md_open_data *obd_mod_alloc(void)
        if (atomic_dec_and_test(&(mod)->mod_refcount)) {          \
                if ((mod)->mod_open_req)                          \
                        ptlrpc_req_finished((mod)->mod_open_req);   \
-               OBD_FREE_PTR(mod);                            \
+               kfree(mod);                           \
        }                                                      \
 })
 
index 725481d3916e625267565bdc01e1d01563f258cc..aa68608c3cbd7d77c10275283f8362e2a9a2ec69 100644 (file)
@@ -1996,7 +1996,7 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
        struct obd_export               *exp       = ll_s2sbi(sb)->ll_md_exp;
 
        body = req_capsule_server_get(&open_req->rq_pill, &RMF_MDT_BODY);
-       OBD_ALLOC_PTR(op_data);
+       op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
        if (!op_data) {
                CWARN("%s: cannot allocate op_data to release open handle for "
                      DFID "\n",
This page took 0.03106 seconds and 5 git commands to generate.