aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dir2.c')
-rw-r--r--fs/xfs/xfs_dir2.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index 0284af1734bd..675899bb7048 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -65,6 +65,7 @@ xfs_dir_mount(
65 (mp->m_dirblksize - (uint)sizeof(xfs_da_node_hdr_t)) / 65 (mp->m_dirblksize - (uint)sizeof(xfs_da_node_hdr_t)) /
66 (uint)sizeof(xfs_da_node_entry_t); 66 (uint)sizeof(xfs_da_node_entry_t);
67 mp->m_dir_magicpct = (mp->m_dirblksize * 37) / 100; 67 mp->m_dir_magicpct = (mp->m_dirblksize * 37) / 100;
68 mp->m_dirnameops = &xfs_default_nameops;
68} 69}
69 70
70/* 71/*
@@ -164,7 +165,7 @@ xfs_dir_createname(
164 165
165 args.name = name->name; 166 args.name = name->name;
166 args.namelen = name->len; 167 args.namelen = name->len;
167 args.hashval = xfs_da_hashname(name->name, name->len); 168 args.hashval = dp->i_mount->m_dirnameops->hashname(name);
168 args.inumber = inum; 169 args.inumber = inum;
169 args.dp = dp; 170 args.dp = dp;
170 args.firstblock = first; 171 args.firstblock = first;
@@ -210,11 +211,12 @@ xfs_dir_lookup(
210 211
211 args.name = name->name; 212 args.name = name->name;
212 args.namelen = name->len; 213 args.namelen = name->len;
213 args.hashval = xfs_da_hashname(name->name, name->len); 214 args.hashval = dp->i_mount->m_dirnameops->hashname(name);
214 args.dp = dp; 215 args.dp = dp;
215 args.whichfork = XFS_DATA_FORK; 216 args.whichfork = XFS_DATA_FORK;
216 args.trans = tp; 217 args.trans = tp;
217 args.oknoent = 1; 218 args.oknoent = 1;
219 args.cmpresult = XFS_CMP_DIFFERENT;
218 220
219 if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) 221 if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
220 rval = xfs_dir2_sf_lookup(&args); 222 rval = xfs_dir2_sf_lookup(&args);
@@ -257,7 +259,7 @@ xfs_dir_removename(
257 259
258 args.name = name->name; 260 args.name = name->name;
259 args.namelen = name->len; 261 args.namelen = name->len;
260 args.hashval = xfs_da_hashname(name->name, name->len); 262 args.hashval = dp->i_mount->m_dirnameops->hashname(name);
261 args.inumber = ino; 263 args.inumber = ino;
262 args.dp = dp; 264 args.dp = dp;
263 args.firstblock = first; 265 args.firstblock = first;
@@ -340,7 +342,7 @@ xfs_dir_replace(
340 342
341 args.name = name->name; 343 args.name = name->name;
342 args.namelen = name->len; 344 args.namelen = name->len;
343 args.hashval = xfs_da_hashname(name->name, name->len); 345 args.hashval = dp->i_mount->m_dirnameops->hashname(name);
344 args.inumber = inum; 346 args.inumber = inum;
345 args.dp = dp; 347 args.dp = dp;
346 args.firstblock = first; 348 args.firstblock = first;
@@ -388,7 +390,7 @@ xfs_dir_canenter(
388 390
389 args.name = name->name; 391 args.name = name->name;
390 args.namelen = name->len; 392 args.namelen = name->len;
391 args.hashval = xfs_da_hashname(name->name, name->len); 393 args.hashval = dp->i_mount->m_dirnameops->hashname(name);
392 args.dp = dp; 394 args.dp = dp;
393 args.whichfork = XFS_DATA_FORK; 395 args.whichfork = XFS_DATA_FORK;
394 args.trans = tp; 396 args.trans = tp;