mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fs: decouple READ and WRITE from the block layer ops
Move READ and WRITE to kernel.h and don't define them in terms of block layer ops; they are our generic data direction indicators these days and have no more resemblance with the block layer ops. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
70fd76140a
commit
d38499530e
4 changed files with 11 additions and 14 deletions
|
@ -62,6 +62,12 @@
|
|||
#define bio_sectors(bio) ((bio)->bi_iter.bi_size >> 9)
|
||||
#define bio_end_sector(bio) ((bio)->bi_iter.bi_sector + bio_sectors((bio)))
|
||||
|
||||
/*
|
||||
* Return the data direction, READ or WRITE.
|
||||
*/
|
||||
#define bio_data_dir(bio) \
|
||||
(op_is_write(bio_op(bio)) ? WRITE : READ)
|
||||
|
||||
/*
|
||||
* Check whether this bio carries any data or not. A NULL bio is allowed.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue