diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 72a334978f69..fd86d536ff27 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3687,6 +3687,9 @@ static int ext4_iomap_alloc(struct inode *inode, struct ext4_map_blocks *map, int ret, dio_credits, m_flags = 0, retries = 0; bool force_commit = false; + if (flags & IOMAP_NOWAIT) + return -EAGAIN; + /* * Trim the mapping request to the maximum value that we can map at * once for direct I/O.