aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe2011-07-23 13:34:59 -0500
committerJens Axboe2011-07-23 13:34:59 -0500
commit4c64500eada358165d0bb9a20d6c7d30821995b4 (patch)
tree27cb0aed7b45d5043d6bbb0b3471719e9230c868 /block/blk-lib.c
parentd7b7630130e52361af66ce3b994696e2357ba7de (diff)
downloadkernel-common-4c64500eada358165d0bb9a20d6c7d30821995b4.tar.gz
kernel-common-4c64500eada358165d0bb9a20d6c7d30821995b4.tar.xz
kernel-common-4c64500eada358165d0bb9a20d6c7d30821995b4.zip
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 64974b1c7cc..2b461b496a7 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,
59 * granularity 59 * granularity
60 */ 60 */
61 max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9); 61 max_discard_sectors = min(q->limits.max_discard_sectors, UINT_MAX >> 9);
62 if (!unlikely(!max_discard_sectors)) { 62 if (unlikely(!max_discard_sectors)) {
63 /* Avoid infinite loop below. Being cautious never hurts. */ 63 /* Avoid infinite loop below. Being cautious never hurts. */
64 return -EOPNOTSUPP; 64 return -EOPNOTSUPP;
65 } else if (q->limits.discard_granularity) { 65 } else if (q->limits.discard_granularity) {