Skip to content

Commit 7fd8720

Browse files
Christoph Hellwigbrauner
authored andcommitted
iomap: allocate s_dio_done_wq for async reads as well
Since commit 222f2c7 ("iomap: always run error completions in user context"), read error completions are deferred to s_dio_done_wq. This means the workqueue also needs to be allocated for async reads. Fixes: 222f2c7 ("iomap: always run error completions in user context") Reported-by: syzbot+a2b9a4ed0d61b1efb3f5@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20251124140013.902853-1-hch@lst.de Tested-by: syzbot+a2b9a4ed0d61b1efb3f5@syzkaller.appspotmail.com Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent d7ff85d commit 7fd8720

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

fs/iomap/direct-io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,12 +734,12 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
734734
}
735735
goto out_free_dio;
736736
}
737+
}
737738

738-
if (!wait_for_completion && !inode->i_sb->s_dio_done_wq) {
739-
ret = sb_init_dio_done_wq(inode->i_sb);
740-
if (ret < 0)
741-
goto out_free_dio;
742-
}
739+
if (!wait_for_completion && !inode->i_sb->s_dio_done_wq) {
740+
ret = sb_init_dio_done_wq(inode->i_sb);
741+
if (ret < 0)
742+
goto out_free_dio;
743743
}
744744

745745
inode_dio_begin(inode);

0 commit comments

Comments
 (0)