2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 18:53:52 +08:00

block: make bio_rw_flagged() return a bool

Makes for a saner interface, instead of returning the bit position.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
Jens Axboe 2009-07-28 10:15:30 +02:00
parent e3264a4d7d
commit e7e503aedb

View File

@ -177,7 +177,10 @@ enum bio_rw_flags {
BIO_RW_NOIDLE,
};
#define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag)))
static inline bool bio_rw_flagged(struct bio *bio, enum bio_rw_flags flag)
{
return (bio->bi_rw & (1 << flag)) != 0;
}
/*
* Old defines, these should eventually be replaced by direct usage of