block: don't warn for flush on read-only device
authorJens Axboe <[email protected]>
Tue, 14 Aug 2018 16:52:40 +0000 (10:52 -0600)
committerJens Axboe <[email protected]>
Tue, 14 Aug 2018 16:52:40 +0000 (10:52 -0600)
commitb089cfd95d32638335c551651a8e00fd2c4edb0b
tree5e48ee9470ecab0bd4525fcb93ab97a9f6b583d0
parenteb2b3d034511f7f5f5fa781b9354ea4d5dbd4fc5
block: don't warn for flush on read-only device

Don't warn for a flush issued to a read-only device. It's not strictly
a writable command, as it doesn't change any on-media data by itself.

Reported-by: Stefan Agner <[email protected]>
Fixes: 721c7fc701c7 ("block: fail op_is_write() requests to read-only partitions")
Signed-off-by: Jens Axboe <[email protected]>
block/blk-core.c