Skip to content

Commit

Permalink
block: make bio_rw_flagged() return a bool
Browse files Browse the repository at this point in the history
Makes for a saner interface, instead of returning the bit position.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Sep 11, 2009
1 parent e3264a4 commit e7e503a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7e503a

Please sign in to comment.