diff options
author | Andrea Righi | 2010-08-19 23:13:27 +0200 |
---|---|---|
committer | Linus Torvalds | 2010-08-20 18:34:54 +0200 |
commit | b35de43b31040828f83046f40fd34ba33146409d (patch) | |
tree | 693ffff84f463da3a7d81d8bd7bb26e144d7d499 /kernel/kfifo.c | |
parent | matroxfb: fix incorrect use of memcpy_toio() (diff) | |
download | kernel-qcow2-linux-b35de43b31040828f83046f40fd34ba33146409d.tar.gz kernel-qcow2-linux-b35de43b31040828f83046f40fd34ba33146409d.tar.xz kernel-qcow2-linux-b35de43b31040828f83046f40fd34ba33146409d.zip |
kfifo: implement missing __kfifo_skip_r()
kfifo_skip() is currently broken, due to the missing of the internal
helper function. Add it.
Signed-off-by: Andrea Righi <arighi@develer.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kfifo.c')
-rw-r--r-- | kernel/kfifo.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 4502604ecadf..6b5580c57644 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c @@ -503,6 +503,15 @@ unsigned int __kfifo_out_r(struct __kfifo *fifo, void *buf, } EXPORT_SYMBOL(__kfifo_out_r); +void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize) +{ + unsigned int n; + + n = __kfifo_peek_n(fifo, recsize); + fifo->out += n + recsize; +} +EXPORT_SYMBOL(__kfifo_skip_r); + int __kfifo_from_user_r(struct __kfifo *fifo, const void __user *from, unsigned long len, unsigned int *copied, size_t recsize) { |