OSDN Git Service

bcache: fix ioctl in flash device
authorTang Junhui <tang.junhui.linux@gmail.com>
Mon, 8 Oct 2018 12:41:10 +0000 (20:41 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Oct 2018 14:19:42 +0000 (08:19 -0600)
commitdd0c91793b7c2658ea32c6b3a2247a8ceca45dc0
tree110f5bd2d12063e627654cbbd2aa24b2e94e2a42
parent752f66a75abad2ae40b4570b3c77b422389cffcf
bcache: fix ioctl in flash device

When doing ioctl in flash device, it will call ioctl_dev() in super.c,
then we should not to get cached device since flash only device has
no backend device. This patch just move the jugement dc->io_disable
to cached_dev_ioctl() to make ioctl in flash device correctly.

Fixes: 0f0709e6bfc3c ("bcache: stop bcache device when backing device is offline")
Signed-off-by: Tang Junhui <tang.junhui.linux@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/request.c
drivers/md/bcache/super.c