diff options
| author | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
| commit | 2536524a91fe5c5a9fddd282fd4e79ee0976aefe (patch) | |
| tree | 30eb5b4cd6d9ed4fda69526537d4fac454cbc5e6 /include/linux/bio.h | |
| parent | 7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72 (diff) | |
| parent | bc4dee5aa72723632a1f83fd0d3720066c93b433 (diff) | |
Merge branch 'master' into for-4.9
Diffstat (limited to 'include/linux/bio.h')
| -rw-r--r-- | include/linux/bio.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 59ffaa68b11b..23ddf4b46a9b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -71,7 +71,8 @@ static inline bool bio_has_data(struct bio *bio) { if (bio && bio->bi_iter.bi_size && - bio_op(bio) != REQ_OP_DISCARD) + bio_op(bio) != REQ_OP_DISCARD && + bio_op(bio) != REQ_OP_SECURE_ERASE) return true; return false; @@ -79,7 +80,9 @@ static inline bool bio_has_data(struct bio *bio) static inline bool bio_no_advance_iter(struct bio *bio) { - return bio_op(bio) == REQ_OP_DISCARD || bio_op(bio) == REQ_OP_WRITE_SAME; + return bio_op(bio) == REQ_OP_DISCARD || + bio_op(bio) == REQ_OP_SECURE_ERASE || + bio_op(bio) == REQ_OP_WRITE_SAME; } static inline bool bio_is_rw(struct bio *bio) @@ -199,6 +202,9 @@ static inline unsigned bio_segments(struct bio *bio) if (bio_op(bio) == REQ_OP_DISCARD) return 1; + if (bio_op(bio) == REQ_OP_SECURE_ERASE) + return 1; + if (bio_op(bio) == REQ_OP_WRITE_SAME) return 1; |
