forked from Minki/linux
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>
This commit is contained in:
parent
54752de928
commit
80e543ae24
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user