summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-08-12 13:22:54 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-08-12 13:22:54 -0300
commitae27c563a6185d47a904c2d71b72580266cb9d86 (patch)
tree9190380f6ed5bf9c62a1ec153db8a5b587769ecb /mm/migrate.c
parent0bf63e2c2913391dbf7e49ed8df2c89c180e58d9 (diff)
parentd45331b00ddb179e291766617259261c112db872 (diff)
downloadlinux-0-day-ae27c563a6185d47a904c2d71b72580266cb9d86.tar.gz
linux-0-day-ae27c563a6185d47a904c2d71b72580266cb9d86.tar.xz
Merge tag 'v5.3-rc4' into patchwork
Linux 5.3-rc4 * tag 'v5.3-rc4': (750 commits) Linux 5.3-rc4 Makefile: Convert -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang ARM: ep93xx: Mark expected switch fall-through scsi: fas216: Mark expected switch fall-throughs pcmcia: db1xxx_ss: Mark expected switch fall-throughs video: fbdev: omapfb_main: Mark expected switch fall-throughs watchdog: riowd: Mark expected switch fall-through s390/net: Mark expected switch fall-throughs crypto: ux500/crypt: Mark expected switch fall-throughs watchdog: wdt977: Mark expected switch fall-through watchdog: scx200_wdt: Mark expected switch fall-through watchdog: Mark expected switch fall-throughs ARM: signal: Mark expected switch fall-through mfd: omap-usb-host: Mark expected switch fall-throughs mfd: db8500-prcmu: Mark expected switch fall-throughs ARM: OMAP: dma: Mark expected switch fall-throughs ARM: alignment: Mark expected switch fall-throughs ARM: tegra: Mark expected switch fall-through ARM/hw_breakpoint: Mark expected switch fall-throughs mm/memremap: Fix reuse of pgmap instances with internal references ...
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 8992741f10aad..a42858d8e00b7 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -767,12 +767,12 @@ recheck_buffers:
}
bh = bh->b_this_page;
} while (bh != head);
- spin_unlock(&mapping->private_lock);
if (busy) {
if (invalidated) {
rc = -EAGAIN;
goto unlock_buffers;
}
+ spin_unlock(&mapping->private_lock);
invalidate_bh_lrus();
invalidated = true;
goto recheck_buffers;
@@ -805,6 +805,8 @@ recheck_buffers:
rc = MIGRATEPAGE_SUCCESS;
unlock_buffers:
+ if (check_refs)
+ spin_unlock(&mapping->private_lock);
bh = head;
do {
unlock_buffer(bh);
@@ -2338,16 +2340,13 @@ next:
static void migrate_vma_collect(struct migrate_vma *migrate)
{
struct mmu_notifier_range range;
- struct mm_walk mm_walk;
-
- mm_walk.pmd_entry = migrate_vma_collect_pmd;
- mm_walk.pte_entry = NULL;
- mm_walk.pte_hole = migrate_vma_collect_hole;
- mm_walk.hugetlb_entry = NULL;
- mm_walk.test_walk = NULL;
- mm_walk.vma = migrate->vma;
- mm_walk.mm = migrate->vma->vm_mm;
- mm_walk.private = migrate;
+ struct mm_walk mm_walk = {
+ .pmd_entry = migrate_vma_collect_pmd,
+ .pte_hole = migrate_vma_collect_hole,
+ .vma = migrate->vma,
+ .mm = migrate->vma->vm_mm,
+ .private = migrate,
+ };
mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm_walk.mm,
migrate->start,