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 <zab@versity.com>
This commit is contained in:
Zach Brown
2017-05-12 08:55:57 -07:00
parent 81866620a9
commit a262a158ce

View File

@@ -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;