Skip to contentSkip to conversation

Btrfs: cleanup 'start' subtraction from try uncompressed inline extent

PATCH In review Timofey Titovets 2 participants 2 messages Sep 14, 2017 – Sep 17, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: cleanup 'start' subtraction from try uncompressed inline extent

Was added in:
c8b978188c9a0fd3d535c13debd19d522b726f1f
"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.

---
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
index 02ef32149c15..81123408e82e 100644
@@ -570,7 +570,7 @@ static noinline void compress_file_range(struct inode *inode,
 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.
 			 */
Signature · 1 line
2.14.1
Reviewed-by on v1 1/1
#1 lore raw

At Fri, 15 Sep 2017 01:57:26 +0300,

Quoted 10 lines · Timofey Titovets

Was added in:
c8b978188c9a0fd3d535c13debd19d522b726f1f
"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.

Quoted 24 lines
---
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
index 02ef32149c15..81123408e82e 100644
@@ -570,7 +570,7 @@ static noinline void compress_file_range(struct inode *inode,
 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.
 			 */
Signature · 6 lines
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html