Skip to content

Commit

Permalink
block: don't call into the driver for BLKFLSBUF
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Nov 16, 2020
1 parent daaedb8 commit 4a9d6d6
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions block/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a9d6d6

Please sign in to comment.