OSDN Git Service

Btrfs: cleanup 'start' subtraction from try uncompressed inline extent
authorTimofey Titovets <nefelim4ag@gmail.com>
Thu, 14 Sep 2017 22:57:26 +0000 (01:57 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:57 +0000 (12:27 +0100)
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.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Reviewed-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index ef39156..6274be6 100644 (file)
@@ -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.
                         */