block: fix patch import error in max_discard_sectors check
Jens Axboe [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 64974b1..2b461b4 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) {