Skip to contentSkip to conversation

f2fs: clean up dic->tpages assignment

PATCH New Chao Yu 1 participant 1 message Mar 25, 2020 F2FS file system

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 f2fs: clean up dic->tpages assignment

Just cleanup, no logic change.

---
 fs/f2fs/compress.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
fs/f2fs/compress.c +3 -7
index c82ebba26e75..9cc279ea3bfb 100644
@@ -1363,20 +1363,16 @@ struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
 		goto out_free;
 
 	for (i = 0; i < dic->cluster_size; i++) {
-		if (cc->rpages[i])
+		if (cc->rpages[i]) {
+			dic->tpages[i] = cc->rpages[i];
 			continue;
+		}
 
 		dic->tpages[i] = f2fs_grab_page();
 		if (!dic->tpages[i])
 			goto out_free;
 	}
 
-	for (i = 0; i < dic->cluster_size; i++) {
-		if (dic->tpages[i])
-			continue;
-		dic->tpages[i] = cc->rpages[i];
-	}
-
 	return dic;
 
 out_free:
Signature · 1 line
2.18.0.rc1