mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ext2: Remove useless reset code
@ 2019-01-25 14:01 Liu Xiang
  2019-01-28 14:48 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Xiang @ 2019-01-25 14:01 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, linux-kernel, liuxiang_1999, Liu Xiang

If ((char *)de == dir_end) is true, the name_len will not be used
in the subsequent routine. So the reset code can be removed.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
---
 fs/ext2/dir.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 3b8114d..5ec497f 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -517,7 +517,6 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode)
 		while ((char *)de <= kaddr) {
 			if ((char *)de == dir_end) {
 				/* We hit i_size */
-				name_len = 0;
 				rec_len = chunk_size;
 				de->rec_len = ext2_rec_len_to_disk(chunk_size);
 				de->inode = 0;
-- 
1.9.1


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

end of thread, other threads:[~2019-01-28 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 14:01 [PATCH] ext2: Remove useless reset code Liu Xiang
2019-01-28 14:48 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®