Skip to content

Commit ee4bf86

Browse files
author
Gao Xiang
committed
erofs: fold in used-once helper erofs_workgroup_unfreeze_final()
It's expected that erofs_workgroup_unfreeze_final() won't be used in other places. Let's fold it to simplify the code. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Gao Xiang <[email protected]>
1 parent 0dcd3c9 commit ee4bf86

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

fs/erofs/utils.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,6 @@ int erofs_workgroup_put(struct erofs_workgroup *grp)
127127
return count;
128128
}
129129

130-
static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
131-
{
132-
erofs_workgroup_unfreeze(grp, 0);
133-
__erofs_workgroup_free(grp);
134-
}
135-
136130
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
137131
struct erofs_workgroup *grp)
138132
{
@@ -162,11 +156,9 @@ static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
162156
*/
163157
DBG_BUGON(xa_erase(&sbi->managed_pslots, grp->index) != grp);
164158

165-
/*
166-
* If managed cache is on, last refcount should indicate
167-
* the related workstation.
168-
*/
169-
erofs_workgroup_unfreeze_final(grp);
159+
/* last refcount should be connected with its managed pslot. */
160+
erofs_workgroup_unfreeze(grp, 0);
161+
__erofs_workgroup_free(grp);
170162
return true;
171163
}
172164

0 commit comments

Comments
 (0)