From: Christoph Hellwig Date: Fri, 24 Jul 2020 05:45:58 +0000 (-0700) Subject: xfs: use ENOTBLK for direct I/O to buffered I/O fallback X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=80e543ae24db8f03241004136cb5bb37586fba70;p=linux.git xfs: use ENOTBLK for direct I/O to buffered I/O fallback This is what the classic fs/direct-io.c implementation and thuse other file systems use. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 00db81eac80d6..a6ef90457abf9 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -505,7 +505,7 @@ xfs_file_dio_aio_write( */ if (xfs_is_cow_inode(ip)) { trace_xfs_reflink_bounce_dio_write(ip, iocb->ki_pos, count); - return -EREMCHG; + return -ENOTBLK; } iolock = XFS_IOLOCK_EXCL; } else { @@ -714,7 +714,7 @@ xfs_file_write_iter( * allow an operation to fall back to buffered mode. */ ret = xfs_file_dio_aio_write(iocb, from); - if (ret != -EREMCHG) + if (ret != -ENOTBLK) return ret; }