diff options
author | Yisheng Xie <xieyisheng1@huawei.com> | 2017-02-24 18:00:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 00:41:43 -0500 |
commit | 8f6620e391a43d5da24fa09f98d9b51016545470 (patch) | |
tree | b4cb5208ed62b88dbb9b391a7e661a7a252739c4 | |
parent | 2c290eede9b6375ad15025aa85a7c07c3ce1a3f3 (diff) |
mm balloon: umount balloon_mnt when removing vb device
commit 9c57b5808c625f4fc93da330b932647eaff321f7 upstream.
With CONFIG_BALLOON_COMPACTION=y the kernel will mount balloon_mnt for
balloon page migration when we probe a virtio_balloon device. However
we do not unmount it when removing the device. Fix this.
Fixes: b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature")
Link: http://lkml.kernel.org/r/1486531318-35189-1-git-send-email-xieyisheng1@huawei.com
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/virtio/virtio_balloon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 181793f07852..9d2738e9217f 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) | |||
615 | cancel_work_sync(&vb->update_balloon_stats_work); | 615 | cancel_work_sync(&vb->update_balloon_stats_work); |
616 | 616 | ||
617 | remove_common(vb); | 617 | remove_common(vb); |
618 | #ifdef CONFIG_BALLOON_COMPACTION | ||
618 | if (vb->vb_dev_info.inode) | 619 | if (vb->vb_dev_info.inode) |
619 | iput(vb->vb_dev_info.inode); | 620 | iput(vb->vb_dev_info.inode); |
621 | |||
622 | kern_unmount(balloon_mnt); | ||
623 | #endif | ||
620 | kfree(vb); | 624 | kfree(vb); |
621 | } | 625 | } |
622 | 626 | ||