blkcg: make blkcg_activate_policy() allow NULL ->pd_init_fn

blkg_create() allows NULL ->pd_init_fn() but blkcg_activate_policy()
doesn't.  As both in-kernel policies implement ->pd_init_fn, it
currently doesn't break anything.  Update blkcg_activate_policy() so
that its behavior is consistent with blkg_create().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Tejun Heo 2015-08-18 14:55:10 -07:00 коммит произвёл Jens Axboe
Родитель 4c55f4f9ad
Коммит 3e41871046
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -1083,6 +1083,7 @@ pd_prealloc:
blkg->pd[pol->plid] = pd;
pd->blkg = blkg;
pd->plid = pol->plid;
if (pol->pd_init_fn)
pol->pd_init_fn(blkg);
}