From 7be54bd687ead6aa21e04c8a85a648da369a3d88 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 8 Feb 2018 11:16:19 -0600 Subject: [PATCH] [device/bcache] fix min() function --- lib/device/bcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/device/bcache.c b/lib/device/bcache.c index cea4db406..52be94737 100644 --- a/lib/device/bcache.c +++ b/lib/device/bcache.c @@ -997,7 +997,7 @@ void bcache_prefetch_bytes(struct bcache *cache, int fd, off_t start, size_t len static off_t _min(off_t lhs, off_t rhs) { - if (rhs > lhs) + if (rhs < lhs) return rhs; return lhs;