[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191206054317.3107-1-cgxu519@mykernel.net>
Date: Fri, 6 Dec 2019 13:43:17 +0800
From: Chengguang Xu <cgxu519@...ernel.net>
To: tytso@....edu, adilger.kernel@...ger.ca
Cc: linux-ext4@...r.kernel.org, Chengguang Xu <cgxu519@...ernel.net>
Subject: [PATCH] ext4: remove unnecessary assignment in ext4_htree_store_dirent()
We have allocated memory using kzalloc() so don't have
to set 0 again in last byte.
Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>
---
fs/ext4/dir.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 9fdd2b269d61..5923c9147ae7 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -458,7 +458,6 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash,
new_fn->name_len = ent_name->len;
new_fn->file_type = dirent->file_type;
memcpy(new_fn->name, ent_name->name, ent_name->len);
- new_fn->name[ent_name->len] = 0;
while (*p) {
parent = *p;
--
2.20.1
Powered by blists - more mailing lists