diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mlock.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/mlock.c b/mm/mlock.c index 028ec482fdd4..2b57f7e60390 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -657,7 +657,7 @@ void *alloc_locked_buffer(size_t size) | |||
657 | return buffer; | 657 | return buffer; |
658 | } | 658 | } |
659 | 659 | ||
660 | void free_locked_buffer(void *buffer, size_t size) | 660 | void release_locked_buffer(void *buffer, size_t size) |
661 | { | 661 | { |
662 | unsigned long pgsz = PAGE_ALIGN(size) >> PAGE_SHIFT; | 662 | unsigned long pgsz = PAGE_ALIGN(size) >> PAGE_SHIFT; |
663 | 663 | ||
@@ -667,6 +667,11 @@ void free_locked_buffer(void *buffer, size_t size) | |||
667 | current->mm->locked_vm -= pgsz; | 667 | current->mm->locked_vm -= pgsz; |
668 | 668 | ||
669 | up_write(¤t->mm->mmap_sem); | 669 | up_write(¤t->mm->mmap_sem); |
670 | } | ||
671 | |||
672 | void free_locked_buffer(void *buffer, size_t size) | ||
673 | { | ||
674 | release_locked_buffer(buffer, size); | ||
670 | 675 | ||
671 | kfree(buffer); | 676 | kfree(buffer); |
672 | } | 677 | } |