Revert that commit for use with the blkdev_flushbuf ioctl.
This reverts commit
4a9d6d667f0bafed55a9e9f5ae8bceb3680749d7.
Change-Id: Ibba5ecdff7c0d3402a220005856a28783c36cc86
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
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;