mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: devirtualize ->data_entsize
Replace the ->data_entsize dir ops method with a directly called xfs_dir2_data_entsize helper that takes care of the differences between the directory format with and without the file type field. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
5c072127d3
commit
fdbb8c5b80
10 changed files with 45 additions and 46 deletions
|
@ -666,7 +666,7 @@ xfs_dir2_leafn_lookup_for_addname(
|
|||
ASSERT(free->hdr.magic == cpu_to_be32(XFS_DIR2_FREE_MAGIC) ||
|
||||
free->hdr.magic == cpu_to_be32(XFS_DIR3_FREE_MAGIC));
|
||||
}
|
||||
length = dp->d_ops->data_entsize(args->namelen);
|
||||
length = xfs_dir2_data_entsize(mp, args->namelen);
|
||||
/*
|
||||
* Loop over leaf entries with the right hash value.
|
||||
*/
|
||||
|
@ -1320,7 +1320,8 @@ xfs_dir2_leafn_remove(
|
|||
longest = be16_to_cpu(bf[0].length);
|
||||
needlog = needscan = 0;
|
||||
xfs_dir2_data_make_free(args, dbp, off,
|
||||
dp->d_ops->data_entsize(dep->namelen), &needlog, &needscan);
|
||||
xfs_dir2_data_entsize(dp->i_mount, dep->namelen), &needlog,
|
||||
&needscan);
|
||||
/*
|
||||
* Rescan the data block freespaces for bestfree.
|
||||
* Log the data block header if needed.
|
||||
|
@ -1913,7 +1914,7 @@ xfs_dir2_node_addname_int(
|
|||
int needscan = 0; /* need to rescan data frees */
|
||||
__be16 *tagp; /* data entry tag pointer */
|
||||
|
||||
length = dp->d_ops->data_entsize(args->namelen);
|
||||
length = xfs_dir2_data_entsize(dp->i_mount, args->namelen);
|
||||
error = xfs_dir2_node_find_freeblk(args, fblk, &dbno, &fbp, &freehdr,
|
||||
&findex, length);
|
||||
if (error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue