X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=mm%2Fmemory-failure.c;h=24210c9bd8434816ce4451e6041e4e7dab24b165;hb=201698626fbca1cf1a3b686ba14cf2a056500716;hp=55c671904aacf8a5c220031cdfbf8d8aadd0df45;hpb=5ad3dbab569ac39e88fae31690401895c37368b6;p=linux-2.6-microblaze.git diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 55c671904aac..24210c9bd843 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1312,6 +1312,12 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags, */ put_page(page); + /* device metadata space is not recoverable */ + if (!pgmap_pfn_valid(pgmap, pfn)) { + rc = -ENXIO; + goto out; + } + /* * Prevent the inode from being freed while we are interrogating * the address_space, typically this would be handled by