linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] btrfs: remove unnecessary hash_init()
@ 2019-10-10  7:59 Chengguang Xu
  2019-10-10  7:59 ` [PATCH v2 2/3] btrfs: code cleanup for compression type Chengguang Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chengguang Xu @ 2019-10-10  7:59 UTC (permalink / raw)
  To: clm, josef, dsterba; +Cc: linux-btrfs, Chengguang Xu

DEFINE_HASHTABLE itself has already included initialization code,
we don't have to call hash_init() again, so remove it.

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
v1->v2:
- Modify change log to explain why hash_init() is not needed.

 fs/btrfs/props.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index 1e664e0b59b8..68508db3dc65 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -437,8 +437,6 @@ void __init btrfs_props_init(void)
 {
 	int i;
 
-	hash_init(prop_handlers_ht);
-
 	for (i = 0; i < ARRAY_SIZE(prop_handlers); i++) {
 		struct prop_handler *p = &prop_handlers[i];
 		u64 h = btrfs_name_hash(p->xattr_name, strlen(p->xattr_name));
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-10 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  7:59 [PATCH v2 1/3] btrfs: remove unnecessary hash_init() Chengguang Xu
2019-10-10  7:59 ` [PATCH v2 2/3] btrfs: code cleanup for compression type Chengguang Xu
2019-10-10  7:59 ` [PATCH v2 3/3] btrfs: using enum to replace macro Chengguang Xu
2019-10-10 16:58 ` [PATCH v2 1/3] btrfs: remove unnecessary hash_init() David Sterba

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).