diff options
-rw-r--r-- | include/linux/kfifo.h | 2 | ||||
-rw-r--r-- | kernel/kfifo.c | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 311f8753d71..4aa95f203f3 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -836,6 +836,8 @@ extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize); | |||
836 | 836 | ||
837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); | 837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); |
838 | 838 | ||
839 | extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize); | ||
840 | |||
839 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, | 841 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, |
840 | void *buf, unsigned int len, size_t recsize); | 842 | void *buf, unsigned int len, size_t recsize); |
841 | 843 | ||
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 4502604ecad..6b5580c5764 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
@@ -503,6 +503,15 @@ unsigned int __kfifo_out_r(struct __kfifo *fifo, void *buf, | |||
503 | } | 503 | } |
504 | EXPORT_SYMBOL(__kfifo_out_r); | 504 | EXPORT_SYMBOL(__kfifo_out_r); |
505 | 505 | ||
506 | void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize) | ||
507 | { | ||
508 | unsigned int n; | ||
509 | |||
510 | n = __kfifo_peek_n(fifo, recsize); | ||
511 | fifo->out += n + recsize; | ||
512 | } | ||
513 | EXPORT_SYMBOL(__kfifo_skip_r); | ||
514 | |||
506 | int __kfifo_from_user_r(struct __kfifo *fifo, const void __user *from, | 515 | int __kfifo_from_user_r(struct __kfifo *fifo, const void __user *from, |
507 | unsigned long len, unsigned int *copied, size_t recsize) | 516 | unsigned long len, unsigned int *copied, size_t recsize) |
508 | { | 517 | { |