[PATCH] swap: swap unsigned int consistency
The swap header's unsigned int last_page determines the range of swap pages, but swap_info has been using int or unsigned long in some cases: use unsigned int throughout (except, in several places a local unsigned long is useful to avoid overflows when adding). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
53092a7402
commit
6eb396dc4a
@@ -130,10 +130,10 @@ struct swap_info_struct {
|
||||
unsigned int highest_bit;
|
||||
unsigned int cluster_next;
|
||||
unsigned int cluster_nr;
|
||||
unsigned int pages;
|
||||
unsigned int max;
|
||||
unsigned int inuse_pages;
|
||||
int prio; /* swap priority */
|
||||
int pages;
|
||||
unsigned long max;
|
||||
unsigned long inuse_pages;
|
||||
int next; /* next entry on swap list */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user