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