lkml.org 
[lkml]   [2024]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v5 18/35] blkdev.h: move blk_op_is_passthrough() to blk_types.h
Date
This is a very low-level function without any additional dependencies,
and moving it will allow certain sources to omit the "blkdev.h"
dependency.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
include/linux/blk_types.h | 6 ++++++
include/linux/blkdev.h | 6 ------
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index 96a37f399928..ad48c3f5ddd6 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -434,6 +434,12 @@ static inline enum req_op bio_op(const struct bio *bio)
return bio->bi_opf & REQ_OP_MASK;
}

+static inline bool blk_op_is_passthrough(blk_opf_t op)
+{
+ op &= REQ_OP_MASK;
+ return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT;
+}
+
static inline bool op_is_write(blk_opf_t op)
{
return !!(op & (__force blk_opf_t)1);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e67298984913..6bfa4b92bb32 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -260,12 +260,6 @@ static inline int blk_validate_block_size(unsigned long bsize)
return 0;
}

-static inline bool blk_op_is_passthrough(blk_opf_t op)
-{
- op &= REQ_OP_MASK;
- return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT;
-}
-
/*
* BLK_BOUNCE_NONE: never bounce (default)
* BLK_BOUNCE_HIGH: bounce all highmem pages
--
2.39.2

\
 
 \ /
  Last update: 2024-05-27 14:58    [W:0.135 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site