summaryrefslogtreecommitdiff
path: root/fs/bfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-11-12 16:56:19 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2023-12-20 12:09:32 -0500
commit743cde7419bc9580a71a7e6f15eda66d6d8e71c2 (patch)
tree6624acb7af40b44856c4bf08ae68c0edd10e5d07 /fs/bfs
parent96931dfe437cbd480fcfa72bd05b41b9ef15522e (diff)
bfs_add_entry(): get rid of pointless ->d_name.len checks
First of all, any dentry getting here would have passed bfs_lookup(), so it it passed ENAMETOOLONG check there, there's no need to repeat it. And we are not going to get dentries with zero name length - that check ultimately comes from ext2 and it's as pointless here as it used to be there. Acked-by: Tigran Aivazian <aivazian.tigran@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/bfs')
-rw-r--r--fs/bfs/dir.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index fbc4ae80a4b2..c375e22c4c0c 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -275,11 +275,6 @@ static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino)
dprintf("name=%s, namelen=%d\n", name, namelen);
- if (!namelen)
- return -ENOENT;
- if (namelen > BFS_NAMELEN)
- return -ENAMETOOLONG;
-
sblock = BFS_I(dir)->i_sblock;
eblock = BFS_I(dir)->i_eblock;
for (block = sblock; block <= eblock; block++) {