diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2010-10-26 17:21:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:06 -0400 |
commit | 4b20477f588055fbe87e69435d3c2344d250f0d7 (patch) | |
tree | 4e4d1ef7280ea5c09ff10489e6b9c47bc1223a73 /mm/page_alloc.c | |
parent | cf608ac19c95804dc2df43b1f4f9e068aa9034ab (diff) |
memory hotplug: fix notifier's return value check
Even if notifier cannot find any pages, it doesn't mean no pages are
available...And, if there are no notifiers registered, this condition will
be always true and memory hotplug will show -EBUSY.
This is a bug but not critical.
In most case, a pageblock which will be offlined is MIGRATE_MOVABLE This
"notifier" is called only when the pageblock is _not_ MIGRATE_MOVABLE.
But if not MIGRATE_MOVABLE, it's common case that memory hotplug will
fail. So, no one notice this bug.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5faf876cfc3a..099790052bfe 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5336,7 +5336,7 @@ int set_migratetype_isolate(struct page *page) | |||
5336 | */ | 5336 | */ |
5337 | notifier_ret = memory_isolate_notify(MEM_ISOLATE_COUNT, &arg); | 5337 | notifier_ret = memory_isolate_notify(MEM_ISOLATE_COUNT, &arg); |
5338 | notifier_ret = notifier_to_errno(notifier_ret); | 5338 | notifier_ret = notifier_to_errno(notifier_ret); |
5339 | if (notifier_ret || !arg.pages_found) | 5339 | if (notifier_ret) |
5340 | goto out; | 5340 | goto out; |
5341 | 5341 | ||
5342 | for (iter = pfn; iter < (pfn + pageblock_nr_pages); iter++) { | 5342 | for (iter = pfn; iter < (pfn + pageblock_nr_pages); iter++) { |