Skip to content

Commit 743cde7

Browse files
author
Al Viro
committed
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>
1 parent 96931df commit 743cde7

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/bfs/dir.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,6 @@ static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino)
275275

276276
dprintf("name=%s, namelen=%d\n", name, namelen);
277277

278-
if (!namelen)
279-
return -ENOENT;
280-
if (namelen > BFS_NAMELEN)
281-
return -ENAMETOOLONG;
282-
283278
sblock = BFS_I(dir)->i_sblock;
284279
eblock = BFS_I(dir)->i_eblock;
285280
for (block = sblock; block <= eblock; block++) {

0 commit comments

Comments
 (0)