Skip to content

Commit 3a16136

Browse files
author
Al Viro
committed
reiserfs_add_entry(): get rid of pointless namelen checks
In all cases namelen is ->d_name.len of some dentry; moreover, a dentry that has passed ->lookup() without triggering ENAMETOOLONG check there. The comment next to these checks is either a rudiment of some other check that used to be there once upon a time, or an attempt to come up with the possible reason for that check (well, more like "why does ext3 do it?") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b64b073 commit 3a16136

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

fs/reiserfs/namei.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,6 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
451451

452452
BUG_ON(!th->t_trans_id);
453453

454-
/* cannot allow items to be added into a busy deleted directory */
455-
if (!namelen)
456-
return -EINVAL;
457-
458-
if (namelen > REISERFS_MAX_NAME(dir->i_sb->s_blocksize))
459-
return -ENAMETOOLONG;
460-
461454
/* each entry has unique key. compose it */
462455
make_cpu_key(&entry_key, dir,
463456
get_third_component(dir->i_sb, name, namelen),

0 commit comments

Comments
 (0)