mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:50:53 +07:00
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/20200729180235.25443-1-hsiangkao@redhat.com Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
This commit is contained in:
parent
0dcd3c94e0
commit
ee4bf86c69
@ -127,12 +127,6 @@ int erofs_workgroup_put(struct erofs_workgroup *grp)
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
|
|
||||||
{
|
|
||||||
erofs_workgroup_unfreeze(grp, 0);
|
|
||||||
__erofs_workgroup_free(grp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
|
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
|
||||||
struct erofs_workgroup *grp)
|
struct erofs_workgroup *grp)
|
||||||
{
|
{
|
||||||
@ -162,11 +156,9 @@ static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
|
|||||||
*/
|
*/
|
||||||
DBG_BUGON(xa_erase(&sbi->managed_pslots, grp->index) != grp);
|
DBG_BUGON(xa_erase(&sbi->managed_pslots, grp->index) != grp);
|
||||||
|
|
||||||
/*
|
/* last refcount should be connected with its managed pslot. */
|
||||||
* If managed cache is on, last refcount should indicate
|
erofs_workgroup_unfreeze(grp, 0);
|
||||||
* the related workstation.
|
__erofs_workgroup_free(grp);
|
||||||
*/
|
|
||||||
erofs_workgroup_unfreeze_final(grp);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user