]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
block: fix patch import error in max_discard_sectors check
authorJens Axboe <jaxboe@fusionio.com>
Sat, 23 Jul 2011 18:34:59 +0000 (20:34 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 23 Jul 2011 18:34:59 +0000 (20:34 +0200)
A '!' snuck in before the unlikely, rendering it useless.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-lib.c

index 64974b1c7cca6c20738e0f98fc180e36c15876e1..2b461b496a788c11d00616efaf16df121e620160 100644 (file)
@@ -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) {