diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2023-11-12 23:08:50 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-12-21 18:53:25 +0100 |
commit | 3a1613672e859b85cf87bbe7569552b55612a0f5 (patch) | |
tree | 9c9a912d5e268e1ce1d8ed9f9281278ee5910366 /fs/reiserfs | |
parent | __ocfs2_add_entry(), ocfs2_prepare_dir_for_insert(): namelen checks (diff) | |
download | linux-3a1613672e859b85cf87bbe7569552b55612a0f5.tar.xz linux-3a1613672e859b85cf87bbe7569552b55612a0f5.zip |
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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/namei.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 994d6e6995ab..c5f233b4a27f 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c @@ -451,13 +451,6 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th, 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 */ make_cpu_key(&entry_key, dir, get_third_component(dir->i_sb, name, namelen), |