[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1486531318-35189-1-git-send-email-xieyisheng1@huawei.com>
Date: Wed, 8 Feb 2017 13:21:58 +0800
From: Yisheng Xie <xieyisheng1@...wei.com>
To: <akpm@...ux-foundation.org>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<virtualization@...ts.linux-foundation.org>, <minchan@...nel.org>,
<aquini@...hat.com>, <koct9i@...il.com>,
<gi-oh.kim@...fitbricks.com>, <vbabka@...e.cz>,
<mhocko@...nel.org>, <mst@...hat.com>, <jasowang@...hat.com>,
<guohanjun@...wei.com>, <qiuxishi@...wei.com>, <liubo95@...wei.com>
Subject: [PATCH] mm balloon: umount balloon_mnt when remove vb device
With CONFIG_BALLOON_COMPACTION=y, it will mount balloon_mnt for
balloon page migration when probe a virtio_balloon device, however
do not unmount it when remove the device, fix it.
Fixes: b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature")
Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
---
drivers/virtio/virtio_balloon.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 181793f..9d2738e 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -615,8 +615,12 @@ static void virtballoon_remove(struct virtio_device *vdev)
cancel_work_sync(&vb->update_balloon_stats_work);
remove_common(vb);
+#ifdef CONFIG_BALLOON_COMPACTION
if (vb->vb_dev_info.inode)
iput(vb->vb_dev_info.inode);
+
+ kern_unmount(balloon_mnt);
+#endif
kfree(vb);
}
--
1.7.12.4
Powered by blists - more mailing lists