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

Andrea Righi andrea.righi at canonical.com
Tue Oct 19 15:27:27 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1947709

This reverts commit 3f467f6131cf27c4ead53797f4562e2cf7272711.

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

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;
 			}
-- 
2.32.0




More information about the kernel-team mailing list