Merge branch 'for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
[cascardo/linux.git] / include / linux / blk-cgroup.h
index 10648e3..3bf5d33 100644 (file)
@@ -45,7 +45,7 @@ struct blkcg {
        spinlock_t                      lock;
 
        struct radix_tree_root          blkg_tree;
-       struct blkcg_gq                 *blkg_hint;
+       struct blkcg_gq __rcu           *blkg_hint;
        struct hlist_head               blkg_list;
 
        struct blkcg_policy_data        *cpd[BLKCG_MAX_POLS];
@@ -343,16 +343,7 @@ static inline struct blkcg *cpd_to_blkcg(struct blkcg_policy_data *cpd)
  */
 static inline int blkg_path(struct blkcg_gq *blkg, char *buf, int buflen)
 {
-       char *p;
-
-       p = cgroup_path(blkg->blkcg->css.cgroup, buf, buflen);
-       if (!p) {
-               strncpy(buf, "<unavailable>", buflen);
-               return -ENAMETOOLONG;
-       }
-
-       memmove(buf, p, buf + buflen - p);
-       return 0;
+       return cgroup_path(blkg->blkcg->css.cgroup, buf, buflen);
 }
 
 /**