]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/blk-cgroup.h
cgroup: make cgroup_path() and friends behave in the style of strlcpy()
[mirror_ubuntu-artful-kernel.git] / include / linux / blk-cgroup.h
index 10648e300c930ecb06c58371a6c3822a1192d229..4e8c215e185c1dffe6b59541b32848e18f864937 100644 (file)
@@ -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);
 }
 
 /**