block: don't ignore -EOPNOTSUPP blkdev_issue_write_same
authorChristoph Hellwig <hch@lst.de>
Tue, 19 Jul 2016 09:23:34 +0000 (11:23 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 20 Jul 2016 23:35:22 +0000 (17:35 -0600)
WRITE SAME is a data integrity operation and we can't simply ignore
errors.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-lib.c

index 45b35b15496f20d24feff007e2149cf5dfe26560..e371f83a31868e0a4ec9d846cccab07b7a5a5bd0 100644 (file)
@@ -178,7 +178,7 @@ int blkdev_issue_write_same(struct block_device *bdev, sector_t sector,
 
        if (bio)
                ret = submit_bio_wait(bio);
-       return ret != -EOPNOTSUPP ? ret : 0;
+       return ret;
 }
 EXPORT_SYMBOL(blkdev_issue_write_same);