Patch "xfs: clamp a pNFS LAYOUTCOMMIT extent before computing its end" has been added to the 7.3-stable tree
Sasha Levin
AppliedThis is a note to let you know that I've just added the patch titled
xfs: clamp a pNFS LAYOUTCOMMIT extent before computing its end
to the 7.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xfs-clamp-a-pnfs-layoutcommit-extent-before-computin.patch
and it can be found in the queue-7.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
commit 947997c2d71a678463d3611b40d94b1396f1c810
Author: Daejun Park <[email protected]> Date: Thu Oct 29 11:23:01 2026 +0900
xfs: clamp a pNFS LAYOUTCOMMIT extent before computing its end
[ Upstream commit d8c2bc88460f89e543ab3af622fc8f34c7011d71 ]
xfs_fs_commit_blocks() adds the client's length to the offset before it clamps the end to the file size. A large length wraps the sum and reaches xfs_iomap_write_unwritten() unclamped. With the previous two patches the LAYOUTCOMMIT then fails with -EIO and converts nothing.
Clamp the length first.
fs/xfs/xfs_pnfs.c +1 -3
@@ -328,9 +328,7 @@ xfs_fs_commit_blocks(if (start > size)continue ; - end = start + maps[i].length; -if (end > size) - end = size; + end = start +min_t (u64, maps[i].length, size - start); length = end - start;if (!length)