Skip to content

Commit 587a67b

Browse files
author
Gao Xiang
committed
erofs: fold in postsubmit_is_all_bypassed()
No need to introduce such separated helper since cache strategy compile configs were changed into runtime options instead in v5.4. No logic changes. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Gao Xiang <[email protected]>
1 parent 4d20243 commit 587a67b

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

fs/erofs/zdata.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,20 +1148,6 @@ static void move_to_bypass_jobqueue(struct z_erofs_pcluster *pcl,
11481148
qtail[JQ_BYPASS] = &pcl->next;
11491149
}
11501150

1151-
static bool postsubmit_is_all_bypassed(struct z_erofs_decompressqueue *q[],
1152-
unsigned int nr_bios, bool force_fg)
1153-
{
1154-
/*
1155-
* although background is preferred, no one is pending for submission.
1156-
* don't issue workqueue for decompression but drop it directly instead.
1157-
*/
1158-
if (force_fg || nr_bios)
1159-
return false;
1160-
1161-
kvfree(q[JQ_SUBMIT]);
1162-
return true;
1163-
}
1164-
11651151
static bool z_erofs_submit_queue(struct super_block *sb,
11661152
z_erofs_next_pcluster_t owned_head,
11671153
struct list_head *pagepool,
@@ -1262,9 +1248,14 @@ static bool z_erofs_submit_queue(struct super_block *sb,
12621248
if (bio)
12631249
submit_bio(bio);
12641250

1265-
if (postsubmit_is_all_bypassed(q, nr_bios, *force_fg))
1251+
/*
1252+
* although background is preferred, no one is pending for submission.
1253+
* don't issue workqueue for decompression but drop it directly instead.
1254+
*/
1255+
if (!*force_fg && !nr_bios) {
1256+
kvfree(q[JQ_SUBMIT]);
12661257
return true;
1267-
1258+
}
12681259
z_erofs_decompress_kickoff(q[JQ_SUBMIT], *force_fg, nr_bios);
12691260
return true;
12701261
}

0 commit comments

Comments
 (0)