summaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorChristoph Hellwig2016-11-01 14:40:11 +0100
committerJens Axboe2016-11-01 16:43:26 +0100
commitd38499530e5f170d30f32d3841fade204e63081d (patch)
tree931cc16c86ab8d7b07dcda66febb6b1af21e2234 /include/linux/kernel.h
parentblock,fs: use REQ_* flags directly (diff)
downloadkernel-qcow2-linux-d38499530e5f170d30f32d3841fade204e63081d.tar.gz
kernel-qcow2-linux-d38499530e5f170d30f32d3841fade204e63081d.tar.xz
kernel-qcow2-linux-d38499530e5f170d30f32d3841fade204e63081d.zip
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>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index bc6ed52a39b9..01b6b460c34d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -50,6 +50,10 @@
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)
+/* generic data direction definitions */
+#define READ 0
+#define WRITE 1
+
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
#define u64_to_user_ptr(x) ( \