summaryrefslogtreecommitdiffstats
path: root/block/ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-03 11:00:10 +0100
committerJens Axboe <axboe@kernel.dk>2020-11-16 16:14:29 +0100
commit4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7 (patch)
tree407ce7fd01ec171b66dc0ddeeb547c3adeb29914 /block/ioctl.c
parentmtd_blkdevs: don't override BLKFLSBUF (diff)
downloadlinux-4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7.tar.xz
linux-4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7.zip
block: don't call into the driver for BLKFLSBUF
BLKFLSBUF is entirely contained in the block core, and there is no good reason to give the driver a hook into processing it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 3fbc382eb926..c6d8863f0409 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -369,15 +369,8 @@ static inline int is_unrecognized_ioctl(int ret)
static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode,
unsigned cmd, unsigned long arg)
{
- int ret;
-
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
-
- ret = __blkdev_driver_ioctl(bdev, mode, cmd, arg);
- if (!is_unrecognized_ioctl(ret))
- return ret;
-
fsync_bdev(bdev);
invalidate_bdev(bdev);
return 0;