mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
xfs: only assert new size for datafork during truncate extents
The assertion functions properly because we currently only truncate the attr to a zero size. Any other new size of the attr is not preempted. Make this assertion is specific to the datafork, preparing for subsequent patches to truncate the attribute to a non-zero size. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Long Li <leo.lilong@huawei.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
e5966096d0
commit
e942498385
|
|
@ -1048,7 +1048,8 @@ xfs_itruncate_extents_flags(
|
|||
xfs_assert_ilocked(ip, XFS_ILOCK_EXCL);
|
||||
if (icount_read(VFS_I(ip)))
|
||||
xfs_assert_ilocked(ip, XFS_IOLOCK_EXCL);
|
||||
ASSERT(new_size <= XFS_ISIZE(ip));
|
||||
if (whichfork == XFS_DATA_FORK)
|
||||
ASSERT(new_size <= XFS_ISIZE(ip));
|
||||
ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);
|
||||
ASSERT(ip->i_itemp != NULL);
|
||||
ASSERT(ip->i_itemp->ili_lock_flags == 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user