]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Apr 2026 09:09:24 +0000 (11:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Apr 2026 09:09:24 +0000 (11:09 +0200)
added patches:
xfs-only-assert-new-size-for-datafork-during-truncate-extents.patch

queue-6.19/series
queue-6.19/xfs-only-assert-new-size-for-datafork-during-truncate-extents.patch [new file with mode: 0644]

index ab9fe1ddb4f9ce4fbb8647b40a98034f2b712b6c..2beede3dc32b278e379cc818880d4906bf4fd886 100644 (file)
@@ -3,6 +3,7 @@ net-correctly-handle-tunneled-traffic-on-ipv6_csum-gso-fallback.patch
 net-mana-fix-use-after-free-in-add_adev-error-path.patch
 scsi-target-file-use-kzalloc_flex-for-aio_cmd.patch
 scsi-target-tcm_loop-drain-commands-in-target_reset-handler.patch
+xfs-only-assert-new-size-for-datafork-during-truncate-extents.patch
 xfs-factor-out-xfs_attr3_node_entry_remove.patch
 xfs-factor-out-xfs_attr3_leaf_init.patch
 xfs-close-crash-window-in-attr-dabtree-inactivation.patch
diff --git a/queue-6.19/xfs-only-assert-new-size-for-datafork-during-truncate-extents.patch b/queue-6.19/xfs-only-assert-new-size-for-datafork-during-truncate-extents.patch
new file mode 100644 (file)
index 0000000..5b0edcc
--- /dev/null
@@ -0,0 +1,34 @@
+From e942498385bf80f4d6d075b47174035545eb6a2e Mon Sep 17 00:00:00 2001
+From: Long Li <leo.lilong@huawei.com>
+Date: Tue, 17 Mar 2026 09:51:52 +0800
+Subject: xfs: only assert new size for datafork during truncate extents
+
+From: Long Li <leo.lilong@huawei.com>
+
+commit e942498385bf80f4d6d075b47174035545eb6a2e upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/xfs/xfs_inode.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/xfs/xfs_inode.c
++++ b/fs/xfs/xfs_inode.c
+@@ -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);