diff options
author | Shaohua Li <shli@fb.com> | 2016-02-22 15:27:40 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-03 14:50:53 -0700 |
commit | 3684aa7099e0ab1038a1a1bf717ae60ffc3018d1 (patch) | |
tree | 1223fcd0b589e23cc936c46b835ef05d99357270 /fs/block_dev.c | |
parent | e9137d4b93078b6a9965acfb18a2a2ad91cf8405 (diff) | |
download | linux-3684aa7099e0ab1038a1a1bf717ae60ffc3018d1.tar.bz2 |
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 <shli@fb.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 = { |