From: Shaohua Li Date: Mon, 22 Feb 2016 22:27:40 +0000 (-0700) Subject: block-dev: enable writeback cgroup support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3684aa7099e0ab1038a1a1bf717ae60ffc3018d1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block-dev: enable writeback cgroup support block_dev's .writepages/.writepage already handles wbc_init_bio/wbc_account_io. We only set the SB_I_CGROUPWB bit to suppport writeback cgroup support. Signed-off-by: Shaohua Li Acked-by: Tejun Heo Signed-off-by: Jens Axboe --- diff --git a/fs/block_dev.c b/fs/block_dev.c index 7b9cd49622b1..548ded7ccbde 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -575,7 +575,11 @@ static const struct super_operations bdev_sops = { static struct dentry *bd_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC); + struct dentry *dent; + dent = mount_pseudo(fs_type, "bdev:", &bdev_sops, NULL, BDEVFS_MAGIC); + if (dent) + dent->d_sb->s_iflags |= SB_I_CGROUPWB; + return dent; } static struct file_system_type bd_type = {