Lines Matching refs:swap_header

2823 					union swap_header *swap_header,  in read_swap_header()  argument
2831 if (memcmp("SWAPSPACE2", swap_header->magic.magic, 10)) { in read_swap_header()
2837 if (swab32(swap_header->info.version) == 1) { in read_swap_header()
2838 swab32s(&swap_header->info.version); in read_swap_header()
2839 swab32s(&swap_header->info.last_page); in read_swap_header()
2840 swab32s(&swap_header->info.nr_badpages); in read_swap_header()
2841 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
2843 for (i = 0; i < swap_header->info.nr_badpages; i++) in read_swap_header()
2844 swab32s(&swap_header->info.badpages[i]); in read_swap_header()
2847 if (swap_header->info.version != 1) { in read_swap_header()
2849 swap_header->info.version); in read_swap_header()
2858 last_page = swap_header->info.last_page; in read_swap_header()
2882 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode)) in read_swap_header()
2884 if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) in read_swap_header()
2898 union swap_header *swap_header, in setup_swap_map_and_extents() argument
2916 for (i = 0; i < swap_header->info.nr_badpages; i++) { in setup_swap_map_and_extents()
2917 unsigned int page_nr = swap_header->info.badpages[i]; in setup_swap_map_and_extents()
2918 if (page_nr == 0 || page_nr > swap_header->info.last_page) in setup_swap_map_and_extents()
2987 union swap_header *swap_header; in SYSCALL_DEFINE2() local
3056 swap_header = kmap(page); in SYSCALL_DEFINE2()
3058 maxpages = read_swap_header(p, swap_header, inode); in SYSCALL_DEFINE2()
3126 nr_extents = setup_swap_map_and_extents(p, swap_header, swap_map, in SYSCALL_DEFINE2()