* [PATCH] mm balloon: umount balloon_mnt when remove vb device
@ 2017-02-08 5:21 Yisheng Xie
2017-02-08 23:42 ` Minchan Kim
0 siblings, 1 reply; 2+ messages in thread
From: Yisheng Xie @ 2017-02-08 5:21 UTC (permalink / raw)
To: akpm
Cc: linux-mm, linux-kernel, virtualization, minchan, aquini, koct9i,
gi-oh.kim, vbabka, mhocko, mst, jasowang, guohanjun, qiuxishi,
liubo95
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@huawei.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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm balloon: umount balloon_mnt when remove vb device
2017-02-08 5:21 [PATCH] mm balloon: umount balloon_mnt when remove vb device Yisheng Xie
@ 2017-02-08 23:42 ` Minchan Kim
0 siblings, 0 replies; 2+ messages in thread
From: Minchan Kim @ 2017-02-08 23:42 UTC (permalink / raw)
To: Yisheng Xie
Cc: akpm, linux-mm, linux-kernel, virtualization, aquini, koct9i,
gi-oh.kim, vbabka, mhocko, mst, jasowang, guohanjun, qiuxishi,
liubo95
On Wed, Feb 08, 2017 at 01:21:58PM +0800, Yisheng Xie wrote:
> 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@huawei.com>
Thanks for the fixing!
Acked-by: Minchan Kim <minchan@kernel.org>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-08 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08 5:21 [PATCH] mm balloon: umount balloon_mnt when remove vb device Yisheng Xie
2017-02-08 23:42 ` Minchan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).