aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-07-28 10:15:30 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 14:33:31 +0200
commite7e503aedb1f4d165081cb8d47a58c38f80f0cb4 (patch)
treed8530d5f67533bb86b4f8013eef3c569036f4179
parente3264a4d7de147677f1995f119eba05c9abe9c1c (diff)
downloadkernel_samsung_aries-e7e503aedb1f4d165081cb8d47a58c38f80f0cb4.zip
kernel_samsung_aries-e7e503aedb1f4d165081cb8d47a58c38f80f0cb4.tar.gz
kernel_samsung_aries-e7e503aedb1f4d165081cb8d47a58c38f80f0cb4.tar.bz2
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>
-rw-r--r--include/linux/bio.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index a299ed3..4f8fd02 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -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