summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-10-31 17:08:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-31 17:30:47 -0700
commit798248206b59acc6e1238c778281419c041891a7 (patch)
treeff8564431367b442b18bca4a0a9732e5799e2391 /include
parent77311139f364d7f71fc9ba88f59fd90e60205007 (diff)
downloadlinux-3.10-798248206b59acc6e1238c778281419c041891a7.tar.gz
linux-3.10-798248206b59acc6e1238c778281419c041891a7.tar.bz2
linux-3.10-798248206b59acc6e1238c778281419c041891a7.zip
lib/string.c: introduce memchr_inv()
memchr_inv() is mainly used to check whether the whole buffer is filled with just a specified byte. The function name and prototype are stolen from logfs and the implementation is from SLUB. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Christoph Lameter <cl@linux-foundation.org> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Matt Mackall <mpm@selenic.com> Acked-by: Joern Engel <joern@logfs.org> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index a176db2f2c8..e033564f10b 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -114,6 +114,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
#ifndef __HAVE_ARCH_MEMCHR
extern void * memchr(const void *,int,__kernel_size_t);
#endif
+void *memchr_inv(const void *s, int c, size_t n);
extern char *kstrdup(const char *s, gfp_t gfp);
extern char *kstrndup(const char *s, size_t len, gfp_t gfp);