]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - mm/mlock.c
scsi: libfc: Fix for double free()
[people/arne_f/kernel.git] / mm / mlock.c
index dfc6f19121768ee85f269a8ddd1d5bc0f7a5b6fe..1f9ee86672e836b2ea1ad512ed5b99caae1cdc48 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *     linux/mm/mlock.c
  *
@@ -628,11 +629,11 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
  * is also counted.
  * Return value: previously mlocked page counts
  */
-static int count_mm_mlocked_page_nr(struct mm_struct *mm,
+static unsigned long count_mm_mlocked_page_nr(struct mm_struct *mm,
                unsigned long start, size_t len)
 {
        struct vm_area_struct *vma;
-       int count = 0;
+       unsigned long count = 0;
 
        if (mm == NULL)
                mm = current->mm;