Commit 3a161367 authored by Al Viro's avatar Al Viro

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b64b0732
...@@ -451,13 +451,6 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, ...@@ -451,13 +451,6 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
BUG_ON(!th->t_trans_id); BUG_ON(!th->t_trans_id);
/* cannot allow items to be added into a busy deleted directory */
if (!namelen)
return -EINVAL;
if (namelen > REISERFS_MAX_NAME(dir->i_sb->s_blocksize))
return -ENAMETOOLONG;
/* each entry has unique key. compose it */ /* each entry has unique key. compose it */
make_cpu_key(&entry_key, dir, make_cpu_key(&entry_key, dir,
get_third_component(dir->i_sb, name, namelen), get_third_component(dir->i_sb, name, namelen),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment