mirror of https://gitee.com/openkylin/linux.git
Changes since last time:
- Rework nowait locking code to reduce locking overhead penalty -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJZ7pgxAAoJEPh/dxk0SrTrDtcQAKPBwD1xaAS78/JtJ5cmE/ug sC98CzPu8tUCyx2NxUZh3I54C+Ww85UZ2RjGPdDuapLcl2mE415l9ztEoom1H4Xt RpHd/R0GczdHSylV8AI1sBDoSjhUyG7Wpb4OMr+8e+Tv3RvACvQw91BzyHsDOKx5 u03ggEQzKTfkl1p+UKFkZYTd+RxZQhBZYlRakQBqWRJe0s63U+nePkEPFgq/zteN /20JO/ILoGS36FZ00Rf+vWim5fIIZDpDWYSZqM+LBDjgeajaka6lQrXZCQDXxMb+ khC3OAS8fe36xX+SdmN6qAz8bSWHy7Ql/erB7go+obCrsS4Bkbf8g83Nbn7njIYK 7U0tLXYzU/9JAG7Q/HbHgN3nGwGyIBdBt5/XJjNiHgeKR4ItmEwNDvw9RnMqqfCC I0EFvjizOlL5rRW5MUph52+gg+SfY8qZ8k7N4DhJPVEzYwB3f9xjiJDI6QsQM8Ne cVkKbqogLH3sA10iKRwdXGftPXegunjWrx/MYEY2YxTyd4Q7C6DS9o/tLjk9I3TX XZmCaP24DhQrat1yz31T/aeAWUMk5441+cVn5lGVPs0pQuhth3zm3UP+gHx8Vl1y O2o2w77Zv5P9hafiXcrw3ppq9zLMdHcXgLlkJozk8g+PuJbOhKiSO0g3YYjvPeYV DtSQds69R+gn08WRVV8m =EnkX -----END PGP SIGNATURE----- Merge tag 'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "Here's (hopefully) the last bugfix for 4.14: - Rework nowait locking code to reduce locking overhead penalty" * tag 'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix AIM7 regression
This commit is contained in:
commit
4ed590271a
|
@ -237,11 +237,13 @@ xfs_file_dax_read(
|
|||
if (!count)
|
||||
return 0; /* skip atime */
|
||||
|
||||
if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
|
||||
if (iocb->ki_flags & IOCB_NOWAIT)
|
||||
if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
xfs_ilock(ip, XFS_IOLOCK_SHARED);
|
||||
}
|
||||
|
||||
ret = dax_iomap_rw(iocb, to, &xfs_iomap_ops);
|
||||
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
|
||||
|
||||
|
@ -259,9 +261,10 @@ xfs_file_buffered_aio_read(
|
|||
|
||||
trace_xfs_file_buffered_read(ip, iov_iter_count(to), iocb->ki_pos);
|
||||
|
||||
if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
|
||||
if (iocb->ki_flags & IOCB_NOWAIT)
|
||||
if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED))
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
xfs_ilock(ip, XFS_IOLOCK_SHARED);
|
||||
}
|
||||
ret = generic_file_read_iter(iocb, to);
|
||||
|
@ -552,9 +555,10 @@ xfs_file_dio_aio_write(
|
|||
iolock = XFS_IOLOCK_SHARED;
|
||||
}
|
||||
|
||||
if (!xfs_ilock_nowait(ip, iolock)) {
|
||||
if (iocb->ki_flags & IOCB_NOWAIT)
|
||||
if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
if (!xfs_ilock_nowait(ip, iolock))
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
xfs_ilock(ip, iolock);
|
||||
}
|
||||
|
||||
|
@ -606,9 +610,10 @@ xfs_file_dax_write(
|
|||
size_t count;
|
||||
loff_t pos;
|
||||
|
||||
if (!xfs_ilock_nowait(ip, iolock)) {
|
||||
if (iocb->ki_flags & IOCB_NOWAIT)
|
||||
if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
if (!xfs_ilock_nowait(ip, iolock))
|
||||
return -EAGAIN;
|
||||
} else {
|
||||
xfs_ilock(ip, iolock);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue