1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-20 13:24:11 +00:00
Klara Modin 1edaac340f block: change blk_get_meta_cap() stub return -ENOIOCTLCMD
When introduced in commit 9eb22f7fedfc ("fs: add ioctl to query metadata
and protection info capabilities") the stub of blk_get_meta_cap() for
!BLK_DEV_INTEGRITY always returns -EOPNOTSUPP.  The motivation was that
while the command was unsupported in that configuration it was still
recognized.

A later change instead assumed -ENOIOCTLCMD as is required for unknown
ioctl commands per Documentation/driver-api/ioctl.rst. The result being
that on !BLK_DEV_INTEGRITY configs, any ioctl which reaches
blkdev_common_ioctl() will return -EOPNOTSUPP.

Change the stub to return -ENOIOCTLCMD, fixing the issue and better
matching with expectations.

[ The blkdev_common_ioctl() confusion has been fixed, but -ENOIOCTLCMD
  is the right thing to return for unrecognized ioctls, so the patch
  remains the right thing to do.   - Linus ]

Link: https://lore.kernel.org/lkml/CACzX3AsRd__fXb9=CJPTTJC494SDnYAtYrN2=+bZgMCvM6UQDg@mail.gmail.com
Fixes: 42b0ef01e6b5 ("block: fix FS_IOC_GETLBMD_CAP parsing in blkdev_common_ioctl()")
Signed-off-by: Klara Modin <klarasmodin@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-07-28 16:14:18 -07:00
..
2025-06-15 21:19:08 +05:30
2025-06-05 08:07:24 -07:00
2025-07-21 18:18:51 +01:00
2025-07-28 15:12:00 -07:00
2025-07-07 12:24:50 +02:00
2025-06-11 13:39:52 -04:00
2025-07-28 15:50:15 -07:00
2025-06-11 11:57:14 -07:00
2025-07-28 11:22:56 -07:00
2025-06-19 14:28:24 +02:00
2025-06-19 14:28:24 +02:00
2025-06-10 22:08:05 -04:00
2025-07-10 09:39:18 +02:00
2025-07-28 15:24:14 -07:00
2025-07-24 17:58:00 -07:00
2025-06-19 12:36:19 +02:00