]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
swapfile: swapon needs larger size type
authorHugh Dickins <hugh@veritas.com>
Tue, 6 Jan 2009 22:39:47 +0000 (14:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:05 +0000 (15:59 -0800)
commit73fd8748ab0b9b3ddd178bea1d7ae03372033d96
tree6c0173c84ff6ace213578a9a8b03fd73e23ec8ad
parent69beeb1d3428424fbc7546f85e5cd7ac4119c09d
swapfile: swapon needs larger size type

sys_swapon()'s swapfilesize (better renamed swapfilepages) is declared as
an int, but should be an unsigned long like the maxpages it's compared
against: on 64-bit (with 4kB pages) a swapfile of 2^44 bytes was rejected
with "Swap area shorter than signature indicates".

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c