mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
mm/memory-failure: unnecessary amount of unmapping
[ Upstream commit4d75136be8
] It appears that unmap_mapping_range() actually takes a 'size' as its third argument rather than a location, the current calling fashion causes unnecessary amount of unmapping to occur. Link: https://lkml.kernel.org/r/20210420002821.2749748-1-jane.chu@oracle.com Fixes:6100e34b25
("mm, memory_failure: Teach memory_failure() about dev_pagemap pages") Signed-off-by: Jane Chu <jane.chu@oracle.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
62d96faa74
commit
949e7c5f49
1 changed files with 1 additions and 1 deletions
|
@ -1293,7 +1293,7 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
|
|||
* communicated in siginfo, see kill_proc()
|
||||
*/
|
||||
start = (page->index << PAGE_SHIFT) & ~(size - 1);
|
||||
unmap_mapping_range(page->mapping, start, start + size, 0);
|
||||
unmap_mapping_range(page->mapping, start, size, 0);
|
||||
}
|
||||
kill_procs(&tokill, flags & MF_MUST_KILL, !unmap_success, pfn, flags);
|
||||
rc = 0;
|
||||
|
|
Loading…
Reference in a new issue