[v2,1/3] btrfs: remove unnecessary hash_init()
diff mbox series

Message ID 20191010075958.28346-1-cgxu519@mykernel.net
State New
Headers show
Series
  • [v2,1/3] btrfs: remove unnecessary hash_init()
Related show

Commit Message

Chengguang Xu Oct. 10, 2019, 7:59 a.m. UTC
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(-)

Comments

David Sterba Oct. 10, 2019, 4:58 p.m. UTC | #1
On Thu, Oct 10, 2019 at 03:59:56PM +0800, Chengguang Xu wrote:
> 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>

1-3 added to misc-next, with minor updates. Thanks.

Patch
diff mbox series

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