projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git]
/
mm
/
swapfile.c
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index 6c340d908b274c7855b3abd0bdeadff56c8ffc92..746af55b8455ce0e9280b81c78e0ee5f2316f5d4 100644
(file)
--- a/
mm/swapfile.c
+++ b/
mm/swapfile.c
@@
-2116,7
+2116,7
@@
SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
}
/* frontswap enabled? set up bit-per-page map for frontswap */
if (frontswap_enabled)
}
/* frontswap enabled? set up bit-per-page map for frontswap */
if (frontswap_enabled)
- frontswap_map = vzalloc(
maxpages /
sizeof(long));
+ frontswap_map = vzalloc(
BITS_TO_LONGS(maxpages) *
sizeof(long));
if (p->bdev) {
if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {
if (p->bdev) {
if (blk_queue_nonrot(bdev_get_queue(p->bdev))) {