This is a note to let you know that I've just added the patch titled xfs: slightly tweak an assert in xfs_fs_map_blocks to the 5.4-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-slightly-tweak-an-assert-in-xfs_fs_map_blocks.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Wed Sep 21 10:59:34 AM CEST 2022 From: Chandan Babu R <chandan.babu@xxxxxxxxxx> Date: Wed, 21 Sep 2022 08:53:39 +0530 Subject: xfs: slightly tweak an assert in xfs_fs_map_blocks To: gregkh@xxxxxxxxxxxxxxxxxxx Cc: sashal@xxxxxxxxxx, mcgrof@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, djwong@xxxxxxxxxx, chandan.babu@xxxxxxxxxx, amir73il@xxxxxxxxx, leah.rumancik@xxxxxxxxx Message-ID: <20220921032352.307699-5-chandan.babu@xxxxxxxxxx> From: Christoph Hellwig <hch@xxxxxx> commit 88cdb7147b21b2d8b4bd3f3d95ce0bffd73e1ac3 upstream. We should never see delalloc blocks for a pNFS layout, write or not. Adjust the assert to check for that. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx> Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/xfs/xfs_pnfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c @@ -147,11 +147,11 @@ xfs_fs_map_blocks( if (error) goto out_unlock; + ASSERT(!nimaps || imap.br_startblock != DELAYSTARTBLOCK); + if (write) { enum xfs_prealloc_flags flags = 0; - ASSERT(imap.br_startblock != DELAYSTARTBLOCK); - if (!nimaps || imap.br_startblock == HOLESTARTBLOCK) { /* * xfs_iomap_write_direct() expects to take ownership of Patches currently in stable-queue which might be from chandan.babu@xxxxxxxxxx are queue-5.4/xfs-refactor-agfl-length-computation-function.patch queue-5.4/xfs-use-bitops-interface-for-buf-log-item-ail-flag-check.patch queue-5.4/maintainers-add-chandan-as-xfs-maintainer-for-5.4.y.patch queue-5.4/xfs-split-the-sunit-parameter-update-into-two-parts.patch queue-5.4/xfs-slightly-tweak-an-assert-in-xfs_fs_map_blocks.patch queue-5.4/xfs-stabilize-insert-range-start-boundary-to-avoid-cow-writeback-race.patch queue-5.4/iomap-iomap-that-extends-beyond-eof-should-be-marked-dirty.patch queue-5.4/xfs-constify-the-buffer-pointer-arguments-to-error-functions.patch queue-5.4/xfs-attach-dquots-and-reserve-quota-blocks-during-unwritten-conversion.patch queue-5.4/xfs-range-check-ri_cnt-when-recovering-log-items.patch queue-5.4/xfs-fix-deadlock-between-agi-and-agf-when-target_ip-exists-in-xfs_rename.patch queue-5.4/xfs-replace-eio-with-efscorrupted-for-corrupt-metadata.patch queue-5.4/xfs-convert-eio-to-efscorrupted-when-log-contents-are-invalid.patch queue-5.4/xfs-add-missing-assert-in-xfs_fsmap_owner_from_rmap.patch queue-5.4/xfs-always-log-corruption-errors.patch queue-5.4/xfs-fix-some-memory-leaks-in-log-recovery.patch queue-5.4/xfs-don-t-commit-sunit-swidth-updates-to-disk-if-that-would-cause-repair-failures.patch