diff options
| author | Dave Chinner <dchinner@redhat.com> | 2015-02-23 21:47:29 +1100 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2016-06-15 21:29:33 +0100 |
| commit | 7cafecfabbd7119ca94bd5583411ff245bcbbaec (patch) | |
| tree | fd2bc62269fb0ab4286bc4dd39e5e8bb0f66f1c4 /include | |
| parent | 9949c4cad4dd3fbb36e68d84116f58c007571c04 (diff) | |
xfs: lock out page faults from extent swap operations
commit 723cac48473358939759885a18e8df113ea96138 upstream.
Extent swap operations are another extent manipulation operation
that we need to ensure does not race against mmap page faults. The
current code returns if the file is mapped prior to the swap being
done, but it could potentially race against new page faults while
the swap is in progress. Hence we should use the XFS_MMAPLOCK_EXCL
for this operation, too.
While there, fix the error path handling that can result in double
unlocks of the inodes when cancelling the swapext transaction.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
[bwh: Backported to 3.16:
- The obsoleted check for mmap'd files was directly in xfs_swap_extents()
and used VN_MAPPED
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
