mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
iomap: pass error code to should_report_dio_fserror directly
Change should_report_dio_fserror() to take an error code instead of the full struct iomap_dio, decoupling it for reuse by the upcoming simple direct I/O path. No functional change. Signed-off-by: Fengnan Chang <changfengnan@bytedance.com> Link: https://patch.msgid.link/20260701033253.46420-3-changfengnan@bytedance.com Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
27b7efca5b
commit
ef793297cd
@@ -88,9 +88,9 @@ static inline enum fserror_type iomap_dio_err_type(const struct iomap_dio *dio)
|
||||
return FSERR_DIRECTIO_READ;
|
||||
}
|
||||
|
||||
static inline bool should_report_dio_fserror(const struct iomap_dio *dio)
|
||||
static inline bool should_report_dio_fserror(int error)
|
||||
{
|
||||
switch (dio->error) {
|
||||
switch (error) {
|
||||
case 0:
|
||||
case -EAGAIN:
|
||||
case -ENOTBLK:
|
||||
@@ -110,7 +110,7 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
|
||||
|
||||
if (dops && dops->end_io)
|
||||
ret = dops->end_io(iocb, dio->size, ret, dio->flags);
|
||||
if (should_report_dio_fserror(dio))
|
||||
if (should_report_dio_fserror(dio->error))
|
||||
fserror_report_io(file_inode(iocb->ki_filp),
|
||||
iomap_dio_err_type(dio), offset, dio->size,
|
||||
dio->error, GFP_NOFS);
|
||||
|
||||
Reference in New Issue
Block a user