summaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorTakashi Iwai2014-02-20 07:50:32 +0100
committerTakashi Iwai2014-02-20 07:50:32 +0100
commitf31f40be8f82d5eeb4ca084f9ac0f11ca265876b (patch)
tree6fce9ac78045249084d641945e094dcaea72d265 /include/linux/bio.h
parentALSA: hda/ca0132 - Fix recording from mode id 0x8 (diff)
parentMerge remote-tracking branch 'asoc/fix/wm8993' into asoc-linus (diff)
downloadkernel-qcow2-linux-f31f40be8f82d5eeb4ca084f9ac0f11ca265876b.tar.gz
kernel-qcow2-linux-f31f40be8f82d5eeb4ca084f9ac0f11ca265876b.tar.xz
kernel-qcow2-linux-f31f40be8f82d5eeb4ca084f9ac0f11ca265876b.zip
Merge tag 'asoc-v3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.14 A few fixes, all driver speccific ones. The DaVinci ones aren't as clear as they should be from the subject lines on the commits but they fix issues which will prevent correct operation in some use cases and only affect that particular driver so are reasonably safe.
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 70654521dab6..5a4d39b4686b 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -250,6 +250,17 @@ static inline unsigned bio_segments(struct bio *bio)
struct bio_vec bv;
struct bvec_iter iter;
+ /*
+ * We special case discard/write same, because they interpret bi_size
+ * differently:
+ */
+
+ if (bio->bi_rw & REQ_DISCARD)
+ return 1;
+
+ if (bio->bi_rw & REQ_WRITE_SAME)
+ return 1;
+
bio_for_each_segment(bv, bio, iter)
segs++;
@@ -332,6 +343,7 @@ extern struct bio *bio_clone_fast(struct bio *, gfp_t, struct bio_set *);
extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs);
extern struct bio_set *fs_bio_set;
+unsigned int bio_integrity_tag_size(struct bio *bio);
static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs)
{