xfs: xfs_filemap_pmd_fault treats read faults as write faults
authorDave Chinner <dchinner@redhat.com>
Tue, 3 Nov 2015 01:37:02 +0000 (12:37 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 3 Nov 2015 01:37:02 +0000 (12:37 +1100)
commit13ad4fe3e087ab66a140f1e00d98f28aa4e3bb28
treee8f2cddd593803af2c6b8f6c31721ce7fe9d1fdb
parent3af49285854df66260a263198cc15abb07b95287
xfs: xfs_filemap_pmd_fault treats read faults as write faults

The code initially committed didn't have the same checks for write
faults as the dax_pmd_fault code and hence treats all faults as
write faults. We can get read faults through this path because they
is no pmd_mkwrite path for write faults similar to the normal page
fault path. Hence we need to ensure that we only do c/mtime updates
on write faults, and freeze protection is unnecessary for read
faults.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c