On Thu, Oct 20, 2016 at 8:12 AM, Christoph Hellwig <hch@xxxxxx> wrote: > With the addition of the zoned operations the tests in this function > became incorrect. But I think it's much better to just open code the > allow operations in the only caller anyway. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > --- > block/bio-integrity.c | 2 +- > include/linux/bio.h | 11 ----------- > 2 files changed, 1 insertion(+), 12 deletions(-) > > diff --git a/block/bio-integrity.c b/block/bio-integrity.c > index 63f72f0..5384713 100644 > --- a/block/bio-integrity.c > +++ b/block/bio-integrity.c > @@ -172,7 +172,7 @@ bool bio_integrity_enabled(struct bio *bio) > { > struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); > > - if (!bio_is_rw(bio)) > + if (bio_op(bio) != REQ_OP_READ && bio_op(bio) != REQ_OP_WRITE) > return false; > > /* Already protected? */ > diff --git a/include/linux/bio.h b/include/linux/bio.h > index 97cb48f..87ce64d 100644 > --- a/include/linux/bio.h > +++ b/include/linux/bio.h > @@ -83,17 +83,6 @@ static inline bool bio_no_advance_iter(struct bio *bio) > bio_op(bio) == REQ_OP_WRITE_SAME; > } > > -static inline bool bio_is_rw(struct bio *bio) > -{ > - if (!bio_has_data(bio)) > - return false; > - > - if (bio_no_advance_iter(bio)) > - return false; > - > - return true; > -} > - > static inline bool bio_mergeable(struct bio *bio) > { > if (bio->bi_opf & REQ_NOMERGE_FLAGS) > -- > 2.1.4 Reviewed-by: Shaun Tancheff <shaun.tancheff@xxxxxxxxxxx> > -- > To unsubscribe from this list: send the line "unsubscribe linux-block" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DQIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=eUXUrI383Lr3my1STFFRycaVFQy-CfcwPJfzIRErVw4&s=XnPfdA6JzNOaaTaY_Ad-iT1SA_7gLe_j1SnYScNj_AU&e= -- Shaun Tancheff -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html