From: Vladimir Zapolskiy <vladimir@tuxera.com>
To: Gao Xiang <xiang@kernel.org>, Chao Yu <chao@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org,
Matthew Wilcox <willy@infradead.org>,
Anton Altaparmakov <anton@tuxera.com>
Subject: [PATCH 2/3] erofs: remove unused tag argument while registering a workgroup
Date: Thu, 2 Jan 2020 14:01:17 +0200 [thread overview]
Message-ID: <20200102120118.14979-3-vladimir@tuxera.com> (raw)
In-Reply-To: <20200102120118.14979-1-vladimir@tuxera.com>
All workgroups are registered with tag value set to 0, to simplify
erofs_register_workgroup() interface the tag argument can be removed,
if its only value is sent down to the function body.
Signed-off-by: Vladimir Zapolskiy <vladimir@tuxera.com>
---
fs/erofs/internal.h | 2 +-
fs/erofs/utils.c | 5 ++---
fs/erofs/zdata.c | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 55f7560cf1b4..926824578954 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -403,7 +403,7 @@ int erofs_workgroup_put(struct erofs_workgroup *grp);
struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
pgoff_t index);
int erofs_register_workgroup(struct super_block *sb,
- struct erofs_workgroup *grp, bool tag);
+ struct erofs_workgroup *grp);
void erofs_workgroup_free_rcu(struct erofs_workgroup *grp);
void erofs_shrinker_register(struct super_block *sb);
void erofs_shrinker_unregister(struct super_block *sb);
diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c
index 4d1cf4d00dab..7b47c56b89b7 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -83,8 +83,7 @@ struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
}
int erofs_register_workgroup(struct super_block *sb,
- struct erofs_workgroup *grp,
- bool tag)
+ struct erofs_workgroup *grp)
{
struct erofs_sb_info *sbi;
int err;
@@ -102,7 +101,7 @@ int erofs_register_workgroup(struct super_block *sb,
sbi = EROFS_SB(sb);
xa_lock(&sbi->workstn_tree);
- grp = xa_tag_pointer(grp, tag);
+ grp = xa_tag_pointer(grp, 0);
/*
* Bump up reference count before making this workgroup
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 052d28391ce6..4fedeb4496e4 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -437,7 +437,7 @@ static int z_erofs_register_collection(struct z_erofs_collector *clt,
*/
mutex_trylock(&cl->lock);
- err = erofs_register_workgroup(inode->i_sb, &pcl->obj, 0);
+ err = erofs_register_workgroup(inode->i_sb, &pcl->obj);
if (err) {
mutex_unlock(&cl->lock);
kmem_cache_free(pcluster_cachep, pcl);
--
2.20.1
next prev parent reply other threads:[~2020-01-02 12:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 12:01 [PATCH 0/3] erofs: remove tags of pointers stored in a radix tree Vladimir Zapolskiy
2020-01-02 12:01 ` [PATCH 1/3] erofs: remove unused tag argument while finding a workgroup Vladimir Zapolskiy
2020-01-02 12:01 ` Vladimir Zapolskiy [this message]
2020-01-02 12:01 ` [PATCH 3/3] erofs: remove void tagging/untagging of workgroup pointers Vladimir Zapolskiy
2020-01-02 12:55 ` [PATCH 0/3] erofs: remove tags of pointers stored in a radix tree Gao Xiang
2020-01-03 7:08 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200102120118.14979-3-vladimir@tuxera.com \
--to=vladimir@tuxera.com \
--cc=anton@tuxera.com \
--cc=chao@kernel.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=willy@infradead.org \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).