Skip to content

Commit 556f38b

Browse files
author
Al Viro
committed
ext4_add_entry(): ->d_name.len is never 0
That bogosity goes back to the initial merge of ext3. Once upon a time ext2 used to have a similar check; that got taken out during the switch to page cache (June 2001). ext3 got merged into mainline 5 months later, still using buffer cache for directories; removal of the pointless check in ext2 should've been done as a separate patch, but it hadn't been, so that thing got missed... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent f6c8bfc commit 556f38b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/ext4/namei.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,8 +2388,6 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry,
23882388

23892389
sb = dir->i_sb;
23902390
blocksize = sb->s_blocksize;
2391-
if (!dentry->d_name.len)
2392-
return -EINVAL;
23932391

23942392
if (fscrypt_is_nokey_name(dentry))
23952393
return -ENOKEY;

0 commit comments

Comments
 (0)