mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
xfs: reduce IOCB_NOWAIT judgment for retry exclusive unaligned DIO
Retry unaligned DIO with exclusive blocking semantics only when the IOCB_NOWAIT flag is not set. If we are doing nonblocking user I/O, propagate the error directly. Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
e62c720817
commit
93e6aa4329
1 changed files with 1 additions and 1 deletions
|
@ -576,9 +576,9 @@ xfs_file_dio_write_unaligned(
|
|||
* don't even bother trying the fast path in this case.
|
||||
*/
|
||||
if (iocb->ki_pos > isize || iocb->ki_pos + count >= isize) {
|
||||
retry_exclusive:
|
||||
if (iocb->ki_flags & IOCB_NOWAIT)
|
||||
return -EAGAIN;
|
||||
retry_exclusive:
|
||||
iolock = XFS_IOLOCK_EXCL;
|
||||
flags = IOMAP_DIO_FORCE_WAIT;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue