diff mbox series

[SRU,B,1/2] Revert "UBUNTU: SAUCE: cachefiles: Page leaking in cachefiles_read_backing_file while vmscan is active"

Message ID 20211019152728.64481-2-andrea.righi@canonical.com
State New
Headers show
Series Drop "UBUNTU: SAUCE: cachefiles: Page leaking in cachefiles_read_backing_file while vmscan is active" | expand

Commit Message

Andrea Righi Oct. 19, 2021, 3:27 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1947709

This reverts commit 3f467f6131cf27c4ead53797f4562e2cf7272711.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
---
 fs/cachefiles/rdwr.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
index 37a81919341bf..01efc649c53de 100644
--- a/fs/cachefiles/rdwr.c
+++ b/fs/cachefiles/rdwr.c
@@ -512,8 +512,6 @@  static int cachefiles_read_backing_file(struct cachefiles_object *object,
 				goto installed_new_backing_page;
 			if (ret != -EEXIST)
 				goto nomem;
-			put_page(newpage);
-			newpage = NULL;
 		}
 
 		/* we've installed a new backing page, so now we need
@@ -538,10 +536,7 @@  static int cachefiles_read_backing_file(struct cachefiles_object *object,
 					    netpage->index, cachefiles_gfp);
 		if (ret < 0) {
 			if (ret == -EEXIST) {
-				put_page(backpage);
-				backpage = NULL;
 				put_page(netpage);
-				netpage = NULL;
 				fscache_retrieval_complete(op, 1);
 				continue;
 			}
@@ -614,10 +609,7 @@  static int cachefiles_read_backing_file(struct cachefiles_object *object,
 					    netpage->index, cachefiles_gfp);
 		if (ret < 0) {
 			if (ret == -EEXIST) {
-				put_page(backpage);
-				backpage = NULL;
 				put_page(netpage);
-				netpage = NULL;
 				fscache_retrieval_complete(op, 1);
 				continue;
 			}