summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-07-23 22:34:59 +0400
committerJens Axboe <jaxboe@fusionio.com>2011-07-23 22:34:59 +0400
commit4c64500eada358165d0bb9a20d6c7d30821995b4 (patch)
tree27cb0aed7b45d5043d6bbb0b3471719e9230c868 /block
parentd7b7630130e52361af66ce3b994696e2357ba7de (diff)
downloadlinux-4c64500eada358165d0bb9a20d6c7d30821995b4.tar.xz
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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 64974b1c7cca..2b461b496a78 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) {