xfs: devirtualize ->sf_get_parent_ino and ->sf_put_parent_ino

The parent inode handling is the same for all directory format variants,
just use direct calls instead of going through a pointless indirect
call.

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:
Christoph Hellwig
2019-11-08 15:02:31 -08:00
committed by Darrick J. Wong
parent 3d92c93b70
commit 84915e1bdd
6 changed files with 16 additions and 23 deletions

View File

@@ -1157,7 +1157,7 @@ xfs_dir2_sf_to_block(
* Create entry for ..
*/
dep = dp->d_ops->data_dotdot_entry_p(hdr);
dep->inumber = cpu_to_be64(dp->d_ops->sf_get_parent_ino(sfp));
dep->inumber = cpu_to_be64(xfs_dir2_sf_get_parent_ino(sfp));
dep->namelen = 2;
dep->name[0] = dep->name[1] = '.';
dp->d_ops->data_put_ftype(dep, XFS_DIR3_FT_DIR);