Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c64500e authored by Jens Axboe's avatar Jens Axboe
Browse files

block: fix patch import error in max_discard_sectors check



A '!' snuck in before the unlikely, rendering it useless.

Reported-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent d7b76301
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {