mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
xfs: fix xfs_rename_space_res for non-pptr filesystems
We don't need to reserve space for a parent pointer update for an
existing target if parent pointers are disabled. Fix this regression
(which LOLLM noticed) so that rename reservations go back to what they
were before parent pointers.
Cc: stable@vger.kernel.org # v6.10
Fixes: 5a8338c882 ("xfs: Add parent pointers to rename")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
035d27cb2a
commit
a800b92634
|
|
@ -127,10 +127,10 @@ xfs_rename_space_res(
|
|||
if (has_whiteout)
|
||||
ret += xfs_parent_calc_space_res(mp, src_namelen);
|
||||
ret += 2 * xfs_parent_calc_space_res(mp, target_namelen);
|
||||
}
|
||||
|
||||
if (target_exists)
|
||||
ret += xfs_parent_calc_space_res(mp, target_namelen);
|
||||
if (target_exists)
|
||||
ret += xfs_parent_calc_space_res(mp, target_namelen);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user