~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to mm/memory-failure.c

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, John Rigby
  • Date: 2011-01-08 18:34:41 UTC
  • Revision ID: james.westby@ubuntu.com-20110108183441-002wttt2gz2sah4b
Tags: 2.6.37-1002.5
[ John Rigby ]

* rebase to new upstreams: 
  v2.6.37 final
  Ubuntu-2.6.37-12.28
* Clean up lintian errors and warnings
  - LP: #697317

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
#include <linux/slab.h>
52
52
#include <linux/swapops.h>
53
53
#include <linux/hugetlb.h>
 
54
#include <linux/memory_hotplug.h>
54
55
#include "internal.h"
55
56
 
56
57
int sysctl_memory_failure_early_kill __read_mostly = 0;
1230
1231
                return 1;
1231
1232
 
1232
1233
        /*
1233
 
         * The lock_system_sleep prevents a race with memory hotplug,
1234
 
         * because the isolation assumes there's only a single user.
 
1234
         * The lock_memory_hotplug prevents a race with memory hotplug.
1235
1235
         * This is a big hammer, a better would be nicer.
1236
1236
         */
1237
 
        lock_system_sleep();
 
1237
        lock_memory_hotplug();
1238
1238
 
1239
1239
        /*
1240
1240
         * Isolate the page, so that it doesn't get reallocated if it
1264
1264
                ret = 1;
1265
1265
        }
1266
1266
        unset_migratetype_isolate(p);
1267
 
        unlock_system_sleep();
 
1267
        unlock_memory_hotplug();
1268
1268
        return ret;
1269
1269
}
1270
1270