diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-05-18 16:05:51 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-06-04 20:45:57 +0200 |
commit | a57d9064e4ee4e9882b922d0627be3d426004c69 (patch) | |
tree | d8d6d9d245a12f5650afd944576499894b47cd71 /fs/ceph/super.c | |
parent | 12b69d5f6fe4064147ddb7e7ea2d4fa4aea3eab5 (diff) |
ceph: flush pending works before shutdown super
Pending works hold inode references, which cause "Busy inodes after
unmount" warning.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 40664e13cc0f..a092cdb69288 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -674,6 +674,13 @@ fail: return ERR_PTR(err); } +static void flush_fs_workqueues(struct ceph_fs_client *fsc) +{ + flush_workqueue(fsc->wb_wq); + flush_workqueue(fsc->pg_inv_wq); + flush_workqueue(fsc->trunc_wq); +} + static void destroy_fs_client(struct ceph_fs_client *fsc) { dout("destroy_fs_client %p\n", fsc); @@ -1089,6 +1096,8 @@ static void ceph_kill_sb(struct super_block *s) dout("kill_sb %p\n", s); ceph_mdsc_pre_umount(fsc->mdsc); + flush_fs_workqueues(fsc); + generic_shutdown_super(s); fsc->client->extra_mon_dispatch = NULL; |