Remove kvasprintf() wrapper

The kvasprintf() function has been available since Linux 2.6.22.
There is no longer a need to maintain this compatibility code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf 2014-10-02 14:42:26 -04:00
parent 0fac9c9e6d
commit 3d5392cefa
2 changed files with 0 additions and 42 deletions

View File

@ -37,7 +37,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_FS_STRUCT_SPINLOCK SPL_AC_FS_STRUCT_SPINLOCK
SPL_AC_KUIDGID_T SPL_AC_KUIDGID_T
SPL_AC_PUT_TASK_STRUCT SPL_AC_PUT_TASK_STRUCT
SPL_AC_KVASPRINTF
SPL_AC_EXPORTED_RWSEM_IS_LOCKED SPL_AC_EXPORTED_RWSEM_IS_LOCKED
SPL_AC_KERNEL_FALLOCATE SPL_AC_KERNEL_FALLOCATE
SPL_AC_KERN_PATH SPL_AC_KERN_PATH
@ -1180,24 +1179,6 @@ AC_DEFUN([SPL_AC_PUT_TASK_STRUCT],
]) ])
]) ])
dnl #
dnl # 2.6.x API change,
dnl # kvasprintf() function added.
dnl #
AC_DEFUN([SPL_AC_KVASPRINTF],
[AC_MSG_CHECKING([whether kvasprintf() is available])
SPL_LINUX_TRY_COMPILE_SYMBOL([
#include <linux/kernel.h>
], [
kvasprintf(0, NULL, *((va_list*)NULL));
], [kvasprintf], [], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_KVASPRINTF, 1, [kvasprintf() is available])
], [
AC_MSG_RESULT(no)
])
])
dnl # dnl #
dnl # 2.6.29 API change, dnl # 2.6.29 API change,
dnl # vfs_fsync() funcation added, prior to this use file_fsync(). dnl # vfs_fsync() funcation added, prior to this use file_fsync().

View File

@ -128,29 +128,6 @@ kmem_debugging(void)
} }
EXPORT_SYMBOL(kmem_debugging); EXPORT_SYMBOL(kmem_debugging);
#ifndef HAVE_KVASPRINTF
/* Simplified asprintf. */
char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
{
unsigned int len;
char *p;
va_list aq;
va_copy(aq, ap);
len = vsnprintf(NULL, 0, fmt, aq);
va_end(aq);
p = kmalloc(len+1, gfp);
if (!p)
return NULL;
vsnprintf(p, len+1, fmt, ap);
return p;
}
EXPORT_SYMBOL(kvasprintf);
#endif /* HAVE_KVASPRINTF */
char * char *
kmem_vasprintf(const char *fmt, va_list ap) kmem_vasprintf(const char *fmt, va_list ap)
{ {