Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[muen/linux.git] / drivers / block / loop.c
index cb0cc86..e6273ae 100644 (file)
@@ -77,6 +77,7 @@
 #include <linux/falloc.h>
 #include <linux/uio.h>
 #include <linux/ioprio.h>
+#include <linux/blk-cgroup.h>
 
 #include "loop.h"
 
@@ -1759,8 +1760,8 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx,
 
        /* always use the first bio's css */
 #ifdef CONFIG_BLK_CGROUP
-       if (cmd->use_aio && rq->bio && rq->bio->bi_css) {
-               cmd->css = rq->bio->bi_css;
+       if (cmd->use_aio && rq->bio && rq->bio->bi_blkg) {
+               cmd->css = &bio_blkcg(rq->bio)->css;
                css_get(cmd->css);
        } else
 #endif