From: Jens Axboe Date: Sat, 23 Jul 2011 18:34:59 +0000 (+0200) Subject: block: fix patch import error in max_discard_sectors check X-Git-Tag: v3.1~604^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c64500eada358165d0bb9a20d6c7d30821995b4;p=platform%2Fkernel%2Flinux-amlogic.git block: fix patch import error in max_discard_sectors check A '!' snuck in before the unlikely, rendering it useless. Reported-by: Mike Snitzer Signed-off-by: Jens Axboe --- diff --git a/block/blk-lib.c b/block/blk-lib.c index 64974b1..2b461b4 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -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) {