mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 01:54:00 +00:00
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>
This commit is contained in:
parent
96931dfe43
commit
743cde7419
@ -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);
|
dprintf("name=%s, namelen=%d\n", name, namelen);
|
||||||
|
|
||||||
if (!namelen)
|
|
||||||
return -ENOENT;
|
|
||||||
if (namelen > BFS_NAMELEN)
|
|
||||||
return -ENAMETOOLONG;
|
|
||||||
|
|
||||||
sblock = BFS_I(dir)->i_sblock;
|
sblock = BFS_I(dir)->i_sblock;
|
||||||
eblock = BFS_I(dir)->i_eblock;
|
eblock = BFS_I(dir)->i_eblock;
|
||||||
for (block = sblock; block <= eblock; block++) {
|
for (block = sblock; block <= eblock; block++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user