diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-05-05 15:21:14 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-05-05 15:21:14 -0400 |
commit | ef1d88ced108df7d652cf3f514b920e661826b71 (patch) | |
tree | fe18b0d5c61b0371b9573c58973e459b10ebeb21 /include/linux/bio.h | |
parent | 04974df8049fc4240d22759a91e035082ccd18b4 (diff) | |
parent | 0ef5a50c1658d4d96a44f145bcb92ff3310c75b1 (diff) |
Merge remote-tracking branch 'jens/for-4.7/core' into dm-4.7
Needed in order to update the DM thinp code to use the new async
__blkdev_issue_discard() interface.
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 6b7481f62218..9faebf7f9a33 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -703,6 +703,17 @@ static inline struct bio *bio_list_get(struct bio_list *bl) } /* + * Increment chain count for the bio. Make sure the CHAIN flag update + * is visible before the raised count. + */ +static inline void bio_inc_remaining(struct bio *bio) +{ + bio_set_flag(bio, BIO_CHAIN); + smp_mb__before_atomic(); + atomic_inc(&bio->__bi_remaining); +} + +/* * bio_set is used to allow other portions of the IO system to * allocate their own private memory pools for bio and iovec structures. * These memory pools in turn all allocate from the bio_slab |