diff options
author | 2024-04-22 09:47:49 -0700 | |
---|---|---|
committer | 2024-04-23 07:46:59 -0700 | |
commit | d2d18330f63cd70b50eddac76de7c59a36f2faa7 (patch) | |
tree | 4c07bcad45155d9daa9ceba685f8244b64756df0 /fs/xfs/libxfs/xfs_trans_space.c | |
parent | xfs: add parent attributes to symlink (diff) | |
download | wireguard-linux-d2d18330f63cd70b50eddac76de7c59a36f2faa7.tar.xz wireguard-linux-d2d18330f63cd70b50eddac76de7c59a36f2faa7.zip |
xfs: remove parent pointers in unlink
This patch removes the parent pointer attribute during unlink
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: adjust to new ondisk format, minor rebase fixes]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_trans_space.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_trans_space.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_trans_space.c b/fs/xfs/libxfs/xfs_trans_space.c index c8adda82debe..df729e4f1a4c 100644 --- a/fs/xfs/libxfs/xfs_trans_space.c +++ b/fs/xfs/libxfs/xfs_trans_space.c @@ -81,3 +81,16 @@ xfs_symlink_space_res( return ret; } + +unsigned int +xfs_remove_space_res( + struct xfs_mount *mp, + unsigned int namelen) +{ + unsigned int ret = XFS_DIRREMOVE_SPACE_RES(mp); + + if (xfs_has_parent(mp)) + ret += xfs_parent_calc_space_res(mp, namelen); + + return ret; +} |