diff options
-rw-r--r-- | fs/fuse/inode.c | 2 | ||||
-rw-r--r-- | kernel/power/snapshot.c | 4 | ||||
-rw-r--r-- | net/ipv4/inet_fragment.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 9a0cdde14a08..0b578598c6ac 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -785,7 +785,7 @@ static const struct super_operations fuse_super_operations = { | |||
785 | static void sanitize_global_limit(unsigned *limit) | 785 | static void sanitize_global_limit(unsigned *limit) |
786 | { | 786 | { |
787 | if (*limit == 0) | 787 | if (*limit == 0) |
788 | *limit = ((num_physpages << PAGE_SHIFT) >> 13) / | 788 | *limit = ((totalram_pages << PAGE_SHIFT) >> 13) / |
789 | sizeof(struct fuse_req); | 789 | sizeof(struct fuse_req); |
790 | 790 | ||
791 | if (*limit >= 1 << 16) | 791 | if (*limit >= 1 << 16) |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 0de28576807d..8b5d1cd933f4 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -1651,7 +1651,7 @@ unsigned long snapshot_get_image_size(void) | |||
1651 | static int init_header(struct swsusp_info *info) | 1651 | static int init_header(struct swsusp_info *info) |
1652 | { | 1652 | { |
1653 | memset(info, 0, sizeof(struct swsusp_info)); | 1653 | memset(info, 0, sizeof(struct swsusp_info)); |
1654 | info->num_physpages = num_physpages; | 1654 | info->num_physpages = get_num_physpages(); |
1655 | info->image_pages = nr_copy_pages; | 1655 | info->image_pages = nr_copy_pages; |
1656 | info->pages = snapshot_get_image_size(); | 1656 | info->pages = snapshot_get_image_size(); |
1657 | info->size = info->pages; | 1657 | info->size = info->pages; |
@@ -1795,7 +1795,7 @@ static int check_header(struct swsusp_info *info) | |||
1795 | char *reason; | 1795 | char *reason; |
1796 | 1796 | ||
1797 | reason = check_image_kernel(info); | 1797 | reason = check_image_kernel(info); |
1798 | if (!reason && info->num_physpages != num_physpages) | 1798 | if (!reason && info->num_physpages != get_num_physpages()) |
1799 | reason = "memory size"; | 1799 | reason = "memory size"; |
1800 | if (reason) { | 1800 | if (reason) { |
1801 | printk(KERN_ERR "PM: Image mismatch: %s\n", reason); | 1801 | printk(KERN_ERR "PM: Image mismatch: %s\n", reason); |
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 7e06641e36ae..cec539458307 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -93,7 +93,7 @@ void inet_frags_init(struct inet_frags *f) | |||
93 | } | 93 | } |
94 | rwlock_init(&f->lock); | 94 | rwlock_init(&f->lock); |
95 | 95 | ||
96 | f->rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ | 96 | f->rnd = (u32) ((totalram_pages ^ (totalram_pages >> 7)) ^ |
97 | (jiffies ^ (jiffies >> 6))); | 97 | (jiffies ^ (jiffies >> 6))); |
98 | 98 | ||
99 | setup_timer(&f->secret_timer, inet_frag_secret_rebuild, | 99 | setup_timer(&f->secret_timer, inet_frag_secret_rebuild, |