summaryrefslogtreecommitdiffstats
path: root/fs/ext4/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-11-12 16:25:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2023-12-21 12:53:11 -0500
commit556f38bf457fee5d9f3ede65b67fd91dd2ea2ca1 (patch)
treec4e046cc7d4d6935a0f0f94389a2bc6766b51a22 /fs/ext4/namei.c
parentf6c8bfcf951feeab716bd051e4c1d767fe82df0f (diff)
downloadlinux-stable-556f38bf457fee5d9f3ede65b67fd91dd2ea2ca1.tar.gz
linux-stable-556f38bf457fee5d9f3ede65b67fd91dd2ea2ca1.tar.bz2
linux-stable-556f38bf457fee5d9f3ede65b67fd91dd2ea2ca1.zip
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>
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r--fs/ext4/namei.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index d252935f9c8a..fa8b8dd841b5 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2388,8 +2388,6 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry,
sb = dir->i_sb;
blocksize = sb->s_blocksize;
- if (!dentry->d_name.len)
- return -EINVAL;
if (fscrypt_is_nokey_name(dentry))
return -ENOKEY;