Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a57d9064 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: flush pending works before shutdown super



Pending works hold inode references, which cause "Busy inodes after
unmount" warning.

Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 12b69d5f
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -674,6 +674,13 @@ static struct ceph_fs_client *create_fs_client(struct ceph_mount_options *fsopt,
	return ERR_PTR(err);
	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)
static void destroy_fs_client(struct ceph_fs_client *fsc)
{
{
	dout("destroy_fs_client %p\n", 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);
	dout("kill_sb %p\n", s);


	ceph_mdsc_pre_umount(fsc->mdsc);
	ceph_mdsc_pre_umount(fsc->mdsc);
	flush_fs_workqueues(fsc);

	generic_shutdown_super(s);
	generic_shutdown_super(s);


	fsc->client->extra_mon_dispatch = NULL;
	fsc->client->extra_mon_dispatch = NULL;