Skip to content

Commit 80e543a

Browse files
Christoph Hellwigdjwong
authored andcommitted
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 <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent 54752de commit 80e543a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ xfs_file_dio_aio_write(
505505
*/
506506
if (xfs_is_cow_inode(ip)) {
507507
trace_xfs_reflink_bounce_dio_write(ip, iocb->ki_pos, count);
508-
return -EREMCHG;
508+
return -ENOTBLK;
509509
}
510510
iolock = XFS_IOLOCK_EXCL;
511511
} else {
@@ -714,7 +714,7 @@ xfs_file_write_iter(
714714
* allow an operation to fall back to buffered mode.
715715
*/
716716
ret = xfs_file_dio_aio_write(iocb, from);
717-
if (ret != -EREMCHG)
717+
if (ret != -ENOTBLK)
718718
return ret;
719719
}
720720

0 commit comments

Comments
 (0)