Skip to content

Commit 93e6aa4

Browse files
kaixuxiakxdchinner
authored andcommitted
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>
1 parent e62c720 commit 93e6aa4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/xfs/xfs_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ xfs_file_dio_write_unaligned(
576576
* don't even bother trying the fast path in this case.
577577
*/
578578
if (iocb->ki_pos > isize || iocb->ki_pos + count >= isize) {
579-
retry_exclusive:
580579
if (iocb->ki_flags & IOCB_NOWAIT)
581580
return -EAGAIN;
581+
retry_exclusive:
582582
iolock = XFS_IOLOCK_EXCL;
583583
flags = IOMAP_DIO_FORCE_WAIT;
584584
}

0 commit comments

Comments
 (0)