]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: handle racy AIO in xfs_reflink_end_cow
authorChristoph Hellwig <hch@lst.de>
Tue, 3 Oct 2017 15:58:33 +0000 (08:58 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 4 Oct 2017 04:27:55 +0000 (21:27 -0700)
commit00b9fc8f09d88cc4b0ecfccbe40d90158cf85b69
treea4d96867b24d45f6e627b72f9d804ed2cb3e92b1
parent42ce333f91f8b51e97f442776efbf3ed9b9e75d8
 xfs: handle racy AIO in xfs_reflink_end_cow

If we got two AIO writes into a COW area the second one might not have any
COW extents left to convert.  Handle that case gracefully instead of
triggering an assert or accessing beyond the bounds of the extent list.

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>
fs/xfs/xfs_reflink.c