提交 e7e503ae 编写于 作者: J Jens Axboe

block: make bio_rw_flagged() return a bool

Makes for a saner interface, instead of returning the bit position.
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 e3264a4d
...@@ -177,7 +177,10 @@ enum bio_rw_flags { ...@@ -177,7 +177,10 @@ enum bio_rw_flags {
BIO_RW_NOIDLE, 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 * Old defines, these should eventually be replaced by direct usage of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册