summaryrefslogtreecommitdiffstats
path: root/fs/xfs/kmem.h
diff options
context:
space:
mode:
authorChristoph Hellwig2016-04-06 01:47:01 +0200
committerDave Chinner2016-04-06 01:47:01 +0200
commit664b60f6babc98ee03c2ff15b9482cc8c5e15a83 (patch)
tree195d42b776a4e311a912147722aa516e9e6d9048 /fs/xfs/kmem.h
parentxfs: Add caller function output to xfs_log_force tracepoint (diff)
downloadkernel-qcow2-linux-664b60f6babc98ee03c2ff15b9482cc8c5e15a83.tar.gz
kernel-qcow2-linux-664b60f6babc98ee03c2ff15b9482cc8c5e15a83.tar.xz
kernel-qcow2-linux-664b60f6babc98ee03c2ff15b9482cc8c5e15a83.zip
xfs: improve kmem_realloc
Use krealloc to implement our realloc function. This helps to avoid new allocations if we are still in the slab bucket. At least for the bmap btree root that's actually the common case. This also allows removing the now unused oldsize argument. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/kmem.h')
-rw-r--r--fs/xfs/kmem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
index d1c66e465ca5..689f746224e7 100644
--- a/fs/xfs/kmem.h
+++ b/fs/xfs/kmem.h
@@ -62,7 +62,7 @@ kmem_flags_convert(xfs_km_flags_t flags)
extern void *kmem_alloc(size_t, xfs_km_flags_t);
extern void *kmem_zalloc_large(size_t size, xfs_km_flags_t);
-extern void *kmem_realloc(const void *, size_t, size_t, xfs_km_flags_t);
+extern void *kmem_realloc(const void *, size_t, xfs_km_flags_t);
static inline void kmem_free(const void *ptr)
{
kvfree(ptr);