Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-12564 libcfs: Use vfree_atomic instead of vfree
[fs/lustre-release.git]
/
libcfs
/
include
/
libcfs
/
libcfs_private.h
diff --git
a/libcfs/include/libcfs/libcfs_private.h
b/libcfs/include/libcfs/libcfs_private.h
index
cbc003d
..
9c48a13
100644
(file)
--- a/
libcfs/include/libcfs/libcfs_private.h
+++ b/
libcfs/include/libcfs/libcfs_private.h
@@
-214,6
+214,9
@@
do { \
#define LIBCFS_CPT_ALLOC(ptr, cptab, cpt, size) \
LIBCFS_CPT_ALLOC_GFP(ptr, cptab, cpt, size, GFP_NOFS)
#define LIBCFS_CPT_ALLOC(ptr, cptab, cpt, size) \
LIBCFS_CPT_ALLOC_GFP(ptr, cptab, cpt, size, GFP_NOFS)
+void init_libcfs_vfree_atomic(void);
+void exit_libcfs_vfree_atomic(void);
+
#define LIBCFS_FREE(ptr, size) \
do { \
int s = (size); \
#define LIBCFS_FREE(ptr, size) \
do { \
int s = (size); \
@@
-226,7
+229,7
@@
do { \
CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %lld).\n", \
s, (ptr), libcfs_kmem_read()); \
if (unlikely(s > LIBCFS_VMALLOC_SIZE)) \
CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p (tot %lld).\n", \
s, (ptr), libcfs_kmem_read()); \
if (unlikely(s > LIBCFS_VMALLOC_SIZE)) \
-
vfree(ptr);
\
+
libcfs_vfree_atomic(ptr);
\
else \
kfree(ptr); \
} while (0)
else \
kfree(ptr); \
} while (0)