summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_pnfs.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-10-30 12:24:58 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-03 10:22:30 -0800
commit88cdb7147b21b2d8b4bd3f3d95ce0bffd73e1ac3 (patch)
tree0230de08c39ba365be9b200f15816f97ed8fac3a /fs/xfs/xfs_pnfs.c
parent57c49444d7cc93167961842af94df465478b2f55 (diff)
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 <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_pnfs.c')
-rw-r--r--fs/xfs/xfs_pnfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index c637f0192976..3634ffff3b07 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