diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 047bb42c282b..d1895bc60fcf 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1577,6 +1577,8 @@ int blkcg_activate_policy(struct gendisk *disk, const struct blkcg_policy *pol) if (blkg->pd[pol->plid]) continue; + if (hlist_unhashed(&blkg->blkcg_node)) + continue; /* If prealloc matches, use it; otherwise try GFP_NOWAIT */ if (blkg == pinned_blkg) {