summaryrefslogtreecommitdiff
path: root/fs/ext3/namei.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-12-18 14:14:22 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-12-18 14:14:22 +1100
commit3843b4d3dcf3137a26e4d2f5cff7d1c79a9d3885 (patch)
tree317299df97d5b1efaa585a136887b515648b5551 /fs/ext3/namei.c
parent043a7a354efb8415c3340e31fe605c6f4bd1b178 (diff)
parent1d5e145e366262c9ee63601ef0b11553e7be0c5e (diff)
Merge commit 'ext4/next'
Diffstat (limited to 'fs/ext3/namei.c')
-rw-r--r--fs/ext3/namei.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 3e5edc92aa0b..4fb04931e6da 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -368,6 +368,8 @@ dx_probe(struct qstr *entry, struct inode *dir,
goto fail;
}
hinfo->hash_version = root->info.hash_version;
+ if (hinfo->hash_version <= DX_HASH_TEA)
+ hinfo->hash_version += EXT3_SB(dir->i_sb)->s_hash_unsigned;
hinfo->seed = EXT3_SB(dir->i_sb)->s_hash_seed;
if (entry)
ext3fs_dirhash(entry->name, entry->len, hinfo);
@@ -636,6 +638,9 @@ int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash,
dir = dir_file->f_path.dentry->d_inode;
if (!(EXT3_I(dir)->i_flags & EXT3_INDEX_FL)) {
hinfo.hash_version = EXT3_SB(dir->i_sb)->s_def_hash_version;
+ if (hinfo.hash_version <= DX_HASH_TEA)
+ hinfo.hash_version +=
+ EXT3_SB(dir->i_sb)->s_hash_unsigned;
hinfo.seed = EXT3_SB(dir->i_sb)->s_hash_seed;
count = htree_dirblock_to_tree(dir_file, dir, 0, &hinfo,
start_hash, start_minor_hash);
@@ -1398,6 +1403,8 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
/* Initialize as for dx_probe */
hinfo.hash_version = root->info.hash_version;
+ if (hinfo.hash_version <= DX_HASH_TEA)
+ hinfo.hash_version += EXT3_SB(dir->i_sb)->s_hash_unsigned;
hinfo.seed = EXT3_SB(dir->i_sb)->s_hash_seed;
ext3fs_dirhash(name, namelen, &hinfo);
frame = frames;