xfs: slightly tweak an assert in xfs_fs_map_blocks

commit 88cdb7147b 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@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christoph Hellwig 2022-09-24 18:26:41 +05:30 committed by Greg Kroah-Hartman
parent c494dbca99
commit 979eb12304
1 changed files with 2 additions and 2 deletions

View File

@ -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