summaryrefslogtreecommitdiffstats
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-07-23 20:34:59 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-07-23 20:34:59 +0200
commit4c64500eada358165d0bb9a20d6c7d30821995b4 (patch)
tree27cb0aed7b45d5043d6bbb0b3471719e9230c868 /block/blk-lib.c
parentd7b7630130e52361af66ce3b994696e2357ba7de (diff)
downloadop-kernel-dev-4c64500eada358165d0bb9a20d6c7d30821995b4.zip
op-kernel-dev-4c64500eada358165d0bb9a20d6c7d30821995b4.tar.gz
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/blk-lib.c')
-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 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) {
OpenPOWER on IntegriCloud