mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
block: simplify BIOVEC_PHYS_MERGEABLE
Turn the macro into an inline, move it to blk.h and simplify the arch hooks a bit. Also rename the function to biovec_phys_mergeable as there is no need to shout. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
27ca1d4ed0
commit
6a9f5f240a
8 changed files with 28 additions and 30 deletions
14
block/blk.h
14
block/blk.h
|
|
@ -149,6 +149,20 @@ static inline void blk_queue_enter_live(struct request_queue *q)
|
|||
percpu_ref_get(&q->q_usage_counter);
|
||||
}
|
||||
|
||||
#ifndef ARCH_BIOVEC_PHYS_MERGEABLE
|
||||
#define ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2) true
|
||||
#endif
|
||||
|
||||
static inline bool biovec_phys_mergeable(const struct bio_vec *vec1,
|
||||
const struct bio_vec *vec2)
|
||||
{
|
||||
if (bvec_to_phys(vec1) + vec1->bv_len != bvec_to_phys(vec2))
|
||||
return false;
|
||||
if (!ARCH_BIOVEC_PHYS_MERGEABLE(vec1, vec2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool __bvec_gap_to_prev(struct request_queue *q,
|
||||
struct bio_vec *bprv, unsigned int offset)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue