From a262a158ce152567aba664668ce3dfab5fe63e84 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 08:55:57 -0700 Subject: [PATCH] scoutfs: fix single block release The offset comparison in release that was meant to catch wrapping was inverted and accidentally prevented releasing a single block. Signed-off-by: Zach Brown --- kmod/src/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/ioctl.c b/kmod/src/ioctl.c index 82375047..39f10c2c 100644 --- a/kmod/src/ioctl.c +++ b/kmod/src/ioctl.c @@ -268,7 +268,7 @@ static long scoutfs_ioc_release(struct file *file, unsigned long arg) start = round_up(args.offset, SCOUTFS_BLOCK_SIZE); end_inc = round_down(args.offset + args.count, SCOUTFS_BLOCK_SIZE) - 1; - if (end_inc > start) + if (end_inc < start) return 0; iblock = start >> SCOUTFS_BLOCK_SHIFT;