/* This function is like krealloc() except it never frees the originally allocated buffer. Use this if you don't want to free the buffer immediately like, for example, with RCU.  */
void* __krealloc(const void *p, size_t new_size, gfp_t flags)
/* This function is like krealloc() except it never frees the originally allocated buffer. Use this if you don't want to free the buffer immediately like, for example, with RCU.  */
void* __krealloc(const void *p, size_t new_size, gfp_t flags)
{
	void *ret;
	size_t ks = 0;
	if (unlikely(!new_size))
		return ZERO_SIZE_PTR;
	if (p)
		ks = ksize(p);
	if (ks >= new_size)
		return (void *)p;
	ret = kmalloc_track_caller(new_size, flags);
	if (ret && p)
		memcpy(ret, p, ks);
	return ret;
}