stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] btrfs: Move free_pages_out label in inline extent handling" failed to apply to 4.14-stable tree
@ 2020-08-19 11:35 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2020-08-19 11:35 UTC (permalink / raw)
  To: nborisov, dsterba; +Cc: stable


The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From cecc8d9038d164eda61fbcd72520975a554ea63e Mon Sep 17 00:00:00 2001
From: Nikolay Borisov <nborisov@suse.com>
Date: Wed, 17 Jul 2019 14:41:45 +0300
Subject: [PATCH] btrfs: Move free_pages_out label in inline extent handling
 branch in compress_file_range

This label is only executed if compress_file_range fails to create an
inline extent. So move its code in the semantically related inline
extent handling branch. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index db814f555b26..385127ab0841 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -622,7 +622,14 @@ static noinline int compress_file_range(struct async_chunk *async_chunk)
 						     PAGE_SET_WRITEBACK |
 						     page_error_op |
 						     PAGE_END_WRITEBACK);
-			goto free_pages_out;
+
+			for (i = 0; i < nr_pages; i++) {
+				WARN_ON(pages[i]->mapping);
+				put_page(pages[i]);
+			}
+			kfree(pages);
+
+			return 0;
 		}
 	}
 
@@ -700,15 +707,6 @@ static noinline int compress_file_range(struct async_chunk *async_chunk)
 	compressed_extents++;
 
 	return compressed_extents;
-
-free_pages_out:
-	for (i = 0; i < nr_pages; i++) {
-		WARN_ON(pages[i]->mapping);
-		put_page(pages[i]);
-	}
-	kfree(pages);
-
-	return 0;
 }
 
 static void free_async_extent_pages(struct async_extent *async_extent)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-19 11:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-19 11:35 FAILED: patch "[PATCH] btrfs: Move free_pages_out label in inline extent handling" failed to apply to 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).