From 31e7fcf6b407332894f676662d3ca5eb73413ade Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Fri, 15 Sep 2017 01:57:26 +0300 Subject: [PATCH] Btrfs: cleanup 'start' subtraction from try uncompressed inline extent Was added in: 6dfc57b3beec5f759ab79d5279defe4eaacc8660 "Btrfs: Add zlib compression support" Survive to near time (from 08.10.2008). Because 'start' checked for zero before branch, so it's safe to remove that subtraction. Signed-off-by: Timofey Titovets Reviewed-by: Satoru Takeuchi Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ef3915666ebfd..6274be64f4c55 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -570,7 +570,7 @@ again: cont: if (start == 0) { /* lets try to make an inline extent */ - if (ret || total_in < (actual_end - start)) { + if (ret || total_in < actual_end) { /* we didn't compress the entire range, try * to make an uncompressed inline extent. */ -- 2.39.5