Lines Matching refs:swap_header
3033 union swap_header *swap_header, in read_swap_header() argument
3041 if (memcmp("SWAPSPACE2", swap_header->magic.magic, 10)) { in read_swap_header()
3047 if (swab32(swap_header->info.version) == 1) { in read_swap_header()
3048 swab32s(&swap_header->info.version); in read_swap_header()
3049 swab32s(&swap_header->info.last_page); in read_swap_header()
3050 swab32s(&swap_header->info.nr_badpages); in read_swap_header()
3051 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
3053 for (i = 0; i < swap_header->info.nr_badpages; i++) in read_swap_header()
3054 swab32s(&swap_header->info.badpages[i]); in read_swap_header()
3057 if (swap_header->info.version != 1) { in read_swap_header()
3059 swap_header->info.version); in read_swap_header()
3068 last_page = swap_header->info.last_page; in read_swap_header()
3093 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode)) in read_swap_header()
3095 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
3109 union swap_header *swap_header, in setup_swap_map_and_extents() argument
3127 for (i = 0; i < swap_header->info.nr_badpages; i++) { in setup_swap_map_and_extents()
3128 unsigned int page_nr = swap_header->info.badpages[i]; in setup_swap_map_and_extents()
3129 if (page_nr == 0 || page_nr > swap_header->info.last_page) in setup_swap_map_and_extents()
3211 union swap_header *swap_header; in SYSCALL_DEFINE2() local
3276 swap_header = kmap(page); in SYSCALL_DEFINE2()
3278 maxpages = read_swap_header(p, swap_header, inode); in SYSCALL_DEFINE2()
3346 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()