linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions
@ 2018-12-16  1:49 Dmitry V. Levin
  2018-12-16 23:50 ` Damien Le Moal
  2018-12-17  2:52 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry V. Levin @ 2018-12-16  1:49 UTC (permalink / raw)
  To: Jens Axboe, Damien Le Moal; +Cc: linux-kernel

According to the documentation in include/uapi/asm-generic/ioctl.h,
_IOW means userspace is writing and kernel is reading, and
_IOR means userspace is reading and kernel is writing.

In case of these two ioctls, kernel is writing and userspace is reading,
so they have to be _IOR instead of _IOW.

Fixes: 72cd87576d1d8 ("block: Introduce BLKGETZONESZ ioctl")
Fixes: 65e4e3eee83d7 ("block: Introduce BLKGETNRZONES ioctl")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---

Since both ioctls were introduced after 4.19,
please make sure they are fixed in 4.20.
Thanks.

 include/uapi/linux/blkzoned.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
index 8f08ff9bdea0..6fa38d001d84 100644
--- a/include/uapi/linux/blkzoned.h
+++ b/include/uapi/linux/blkzoned.h
@@ -141,7 +141,7 @@ struct blk_zone_range {
  */
 #define BLKREPORTZONE	_IOWR(0x12, 130, struct blk_zone_report)
 #define BLKRESETZONE	_IOW(0x12, 131, struct blk_zone_range)
-#define BLKGETZONESZ	_IOW(0x12, 132, __u32)
-#define BLKGETNRZONES	_IOW(0x12, 133, __u32)
+#define BLKGETZONESZ	_IOR(0x12, 132, __u32)
+#define BLKGETNRZONES	_IOR(0x12, 133, __u32)
 
 #endif /* _UAPI_BLKZONED_H */
-- 
ldv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-17  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-16  1:49 [PATCH] uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions Dmitry V. Levin
2018-12-16 23:50 ` Damien Le Moal
2018-12-17  2:52 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).