staging/lustre: Replace last users of OBD_ALLOC/FREE_LARGE
authorOleg Drokin <green@linuxhacker.ru>
Wed, 16 Sep 2015 16:27:02 +0000 (12:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2015 03:32:12 +0000 (20:32 -0700)
OBD_ALLOC_LARGE is now replaced with libcfs_kvzalloc and
OBD_FREE_LARGE is now replaced with kvfree.

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

index 352e5244e68670cc15c29df5e3a1ce860656b9ae..b380359cadab156a41084447bef0ce0f9d9bc3d0 100644 (file)
@@ -258,7 +258,7 @@ int obd_ioctl_popdata(void *arg, void *data, int len);
 
 static inline void obd_ioctl_freedata(char *buf, int len)
 {
-       OBD_FREE_LARGE(buf, len);
+       kvfree(buf);
        return;
 }
 
index 145c9be8fc5dd253e9a6215b83163b35d04b8978..bafef4e6fe947ca393283946e9b454fe0df6d7fe 100644 (file)
@@ -728,8 +728,8 @@ static inline void oti_alloc_cookies(struct obd_trans_info *oti,
        if (num_cookies == 1)
                oti->oti_logcookies = &oti->oti_onecookie;
        else
-               OBD_ALLOC_LARGE(oti->oti_logcookies,
-                               num_cookies * sizeof(oti->oti_onecookie));
+               oti->oti_logcookies = libcfs_kvzalloc(num_cookies * sizeof(oti->oti_onecookie),
+                                                     GFP_NOFS);
 
        oti->oti_numcookies = num_cookies;
 }
@@ -742,8 +742,8 @@ static inline void oti_free_cookies(struct obd_trans_info *oti)
        if (oti->oti_logcookies == &oti->oti_onecookie)
                LASSERT(oti->oti_numcookies == 1);
        else
-               OBD_FREE_LARGE(oti->oti_logcookies,
-                              oti->oti_numcookies*sizeof(oti->oti_onecookie));
+               kvfree(oti->oti_logcookies);
+
        oti->oti_logcookies = NULL;
        oti->oti_numcookies = 0;
 }