From: Christoph Hellwig Date: Wed, 30 Oct 2019 19:24:58 +0000 (-0700) Subject: xfs: slightly tweak an assert in xfs_fs_map_blocks X-Git-Tag: v5.10.7~3672^2~130 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88cdb7147b21b2d8b4bd3f3d95ce0bffd73e1ac3;p=platform%2Fkernel%2Flinux-rpi.git xfs: slightly tweak an assert in xfs_fs_map_blocks 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c index c637f01..3634fff 100644 --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c @@ -148,11 +148,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