From 83196ed67ad153cc91f4d5c4aa4254dca9d44618 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Mon, 4 Aug 2025 16:05:32 -0500 Subject: [PATCH] Dropped redundant isuncryst check in lfs3_file_flush_ Saves a bit of code, at the cost of making this logic a bit more difficult to read: code stack ctx before: 36992 2352 684 after: 36972 (-0.1%) 2352 (+0.0%) 684 (+0.0%) --- lfs3.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lfs3.c b/lfs3.c index bbce621d..90a85ffa 100644 --- a/lfs3.c +++ b/lfs3.c @@ -13993,18 +13993,14 @@ static int lfs3_file_flush_(lfs3_t *lfs3, lfs3_file_t *file, // if we're mid-crystallization, finish crystallizing the block // and graft it into our bshrub/btree - if (lfs3_o_isuncryst(file->b.h.flags)) { - // finish crystallizing - err = lfs3_file_crystallize(lfs3, file); - if (err) { - return err; - } + err = lfs3_file_crystallize(lfs3, file); + if (err) { + return err; + } - // and graft into tree - err = lfs3_file_graft(lfs3, file); - if (err) { - return err; - } + err = lfs3_file_graft(lfs3, file); + if (err) { + return err; } // before we can crystallize we need to figure out the best