Skip to content

Commit 997626d

Browse files
Vladimir ZapolskiyGao Xiang
authored andcommitted
erofs: remove unused tag argument while finding a workgroup
It is feasible to simplify erofs_find_workgroup() interface by removing an unused function argument. While formally the argument is used in the function itself, its assigned value is ignored on the caller side. Signed-off-by: Vladimir Zapolskiy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Gao Xiang <[email protected]>
1 parent a55861c commit 997626d

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

fs/erofs/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static inline void *erofs_get_pcpubuf(unsigned int pagenr)
401401
#ifdef CONFIG_EROFS_FS_ZIP
402402
int erofs_workgroup_put(struct erofs_workgroup *grp);
403403
struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
404-
pgoff_t index, bool *tag);
404+
pgoff_t index);
405405
int erofs_register_workgroup(struct super_block *sb,
406406
struct erofs_workgroup *grp, bool tag);
407407
void erofs_workgroup_free_rcu(struct erofs_workgroup *grp);

fs/erofs/utils.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int erofs_workgroup_get(struct erofs_workgroup *grp)
5959
}
6060

6161
struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
62-
pgoff_t index, bool *tag)
62+
pgoff_t index)
6363
{
6464
struct erofs_sb_info *sbi = EROFS_SB(sb);
6565
struct erofs_workgroup *grp;
@@ -68,7 +68,6 @@ struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
6868
rcu_read_lock();
6969
grp = radix_tree_lookup(&sbi->workstn_tree, index);
7070
if (grp) {
71-
*tag = xa_pointer_tag(grp);
7271
grp = xa_untag_pointer(grp);
7372

7473
if (erofs_workgroup_get(grp)) {

fs/erofs/zdata.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,8 @@ static int z_erofs_lookup_collection(struct z_erofs_collector *clt,
345345
struct z_erofs_pcluster *pcl;
346346
struct z_erofs_collection *cl;
347347
unsigned int length;
348-
bool tag;
349348

350-
grp = erofs_find_workgroup(inode->i_sb, map->m_pa >> PAGE_SHIFT, &tag);
349+
grp = erofs_find_workgroup(inode->i_sb, map->m_pa >> PAGE_SHIFT);
351350
if (!grp)
352351
return -ENOENT;
353352

0 commit comments

Comments
 (0)