summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sysfs.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2017-02-22 11:14:02 +0100
committerJens Axboe <axboe@fb.com>2017-03-08 17:56:12 +0100
commit01388df37627d2e89f0b835377c0eb39d81f671c (patch)
treeb431f6dbe023b4a2c8250f7fb052dff9276888c4 /block/blk-mq-sysfs.c
parentblk-mq: make lifetime consistent between hctx and its kobject (diff)
downloadlinux-01388df37627d2e89f0b835377c0eb39d81f671c.tar.xz
linux-01388df37627d2e89f0b835377c0eb39d81f671c.zip
blk-mq: free hctx->cpumask in release handler of hctx's kobject
It is obviously that hctx->cpumask is per hctx, and both share same lifetime, so this patch moves freeing of hctx->cpumask into release handler of hctx's kobject. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sysfs.c')
-rw-r--r--block/blk-mq-sysfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c
index cb19ec16a7fc..d745ab81033a 100644
--- a/block/blk-mq-sysfs.c
+++ b/block/blk-mq-sysfs.c
@@ -21,6 +21,7 @@ static void blk_mq_hw_sysfs_release(struct kobject *kobj)
{
struct blk_mq_hw_ctx *hctx = container_of(kobj, struct blk_mq_hw_ctx,
kobj);
+ free_cpumask_var(hctx->cpumask);
kfree(hctx->ctxs);
kfree(hctx);
}