summaryrefslogtreecommitdiff
path: root/include/linux/swap.h
diff options
context:
space:
mode:
authorHugh Dickins <hugh.dickins@tiscali.co.uk>2009-12-14 17:58:45 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 08:53:15 -0800
commit8d69aaee80c123b460918816cbfa2e83224c3646 (patch)
tree899a69417dbd81f9b53926d7076629cc9b394ae5 /include/linux/swap.h
parent253d553ba75ab26b3e9e2f70cbf6fbf0813f7e86 (diff)
swap_info: swap_map of chars not shorts
Halve the vmalloc'ed swap_map array from unsigned shorts to unsigned chars: it's still very unusual to reach a swap count of 126, and the next patch allows it to be extended indefinitely. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r--include/linux/swap.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c9d8870892b8..f733deb10748 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -151,9 +151,9 @@ enum {
#define SWAP_CLUSTER_MAX 32
-#define SWAP_MAP_MAX 0x7ffe
-#define SWAP_MAP_BAD 0x7fff
-#define SWAP_HAS_CACHE 0x8000 /* There is a swap cache of entry. */
+#define SWAP_MAP_MAX 0x7e
+#define SWAP_MAP_BAD 0x7f
+#define SWAP_HAS_CACHE 0x80 /* There is a swap cache of entry. */
/*
* The in-memory structure used to track swap areas.
@@ -167,7 +167,7 @@ struct swap_info_struct {
struct block_device *bdev;
struct swap_extent first_swap_extent;
struct swap_extent *curr_swap_extent;
- unsigned short *swap_map;
+ unsigned char *swap_map;
unsigned int lowest_bit;
unsigned int highest_bit;
unsigned int lowest_alloc; /* while preparing discard cluster */