diff --git a/mm/swapfile.c b/mm/swapfile.c index 4a986127f15e85517522391828fb388af4490c2f..84374d8cf814db6e131be7c42fdbd7450b7282d5 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2161,7 +2161,11 @@ void swap_shmem_alloc(swp_entry_t entry) } /* - * increase reference count of swap entry by 1. + * Increase reference count of swap entry by 1. + * Returns 0 for success, or -ENOMEM if a swap_count_continuation is required + * but could not be atomically allocated. Returns 0, just as if it succeeded, + * if __swap_duplicate() fails for another reason (-EINVAL or -ENOENT), which + * might occur if a page table entry has got corrupted. */ int swap_duplicate(swp_entry_t entry) {