Commit 4c64500e authored by Jens Axboe's avatar Jens Axboe

block: fix patch import error in max_discard_sectors check

A '!' snuck in before the unlikely, rendering it useless.
Reported-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent d7b76301
...@@ -59,7 +59,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector, ...@@ -59,7 +59,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
* granularity * granularity
*/ */
max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9); max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9);
if (!unlikely(!max_discard_sectors)) { if (unlikely(!max_discard_sectors)) {
/* Avoid infinite loop below. Being cautious never hurts. */ /* Avoid infinite loop below. Being cautious never hurts. */
return -EOPNOTSUPP; return -EOPNOTSUPP;
} else if (q->limits.discard_granularity) { } else if (q->limits.discard_granularity) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment