mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 12:52:30 +00:00
block: fix patch import error in max_discard_sectors check
A '!' snuck in before the unlikely, rendering it useless. Reported-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
parent
d7b7630130
commit
4c64500ead
@ -59,7 +59,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
|
||||
* granularity
|
||||
*/
|
||||
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. */
|
||||
return -EOPNOTSUPP;
|
||||
} else if (q->limits.discard_granularity) {
|
||||
|
Loading…
Reference in New Issue
Block a user