]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - include/linux/bio.h
block: implement bio_associate_current()
[thirdparty/kernel/linux.git] / include / linux / bio.h
index 129a9c097958f098827abe2243ab6fe1c033ca95..692d3d5b49f53b1b1bbea7dbf64977649e799c7d 100644 (file)
@@ -268,6 +268,14 @@ extern struct bio_vec *bvec_alloc_bs(gfp_t, int, unsigned long *, struct bio_set
 extern void bvec_free_bs(struct bio_set *, struct bio_vec *, unsigned int);
 extern unsigned int bvec_nr_vecs(unsigned short idx);
 
+#ifdef CONFIG_BLK_CGROUP
+int bio_associate_current(struct bio *bio);
+void bio_disassociate_task(struct bio *bio);
+#else  /* CONFIG_BLK_CGROUP */
+static inline int bio_associate_current(struct bio *bio) { return -ENOENT; }
+static inline void bio_disassociate_task(struct bio *bio) { }
+#endif /* CONFIG_BLK_CGROUP */
+
 /*
  * bio_set is used to allow other portions of the IO system to
  * allocate their own private memory pools for bio and iovec structures.