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
|
@ -660,7 +660,7 @@ xfs_dir2_leaf_addname(
|
|||
xfs_dir2_leaf_hdr_from_disk(dp->i_mount, &leafhdr, leaf);
|
||||
ents = leafhdr.ents;
|
||||
bestsp = xfs_dir2_leaf_bests_p(ltp);
|
||||
length = dp->d_ops->data_entsize(args->namelen);
|
||||
length = xfs_dir2_data_entsize(dp->i_mount, args->namelen);
|
||||
|
||||
/*
|
||||
* See if there are any entries with the same hash value
|
||||
|
@ -1397,7 +1397,8 @@ xfs_dir2_leaf_removename(
|
|||
*/
|
||||
xfs_dir2_data_make_free(args, dbp,
|
||||
(xfs_dir2_data_aoff_t)((char *)dep - (char *)hdr),
|
||||
dp->d_ops->data_entsize(dep->namelen), &needlog, &needscan);
|
||||
xfs_dir2_data_entsize(dp->i_mount, dep->namelen), &needlog,
|
||||
&needscan);
|
||||
/*
|
||||
* We just mark the leaf entry stale by putting a null in it.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue