projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3264a4
)
block: make bio_rw_flagged() return a bool
author
Jens Axboe
<jens.axboe@oracle.com>
Tue, 28 Jul 2009 08:15:30 +0000
(10:15 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 11 Sep 2009 12:33:31 +0000
(14:33 +0200)
Makes for a saner interface, instead of returning the bit position.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
include/linux/bio.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/bio.h
b/include/linux/bio.h
index a299ed38fcd783d0f68b55f959d9f81b98c38581..4f8fd0221cd2ceee0712a26b1e8402c5aaf8ff39 100644
(file)
--- 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