Skip to content

Commit 4e82fa1

Browse files
Christoph HellwigChandan Babu R
authored andcommitted
xfs: always take XFS_MMAPLOCK shared in xfs_dax_read_fault
After the previous refactoring, xfs_dax_fault is now never used for write faults, so don't bother with the xfs_ilock_for_write_fault logic to protect against writes when remapping is in progress. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
1 parent 6a39ec1 commit 4e82fa1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/xfs/xfs_file.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,12 +1279,11 @@ xfs_dax_read_fault(
12791279
unsigned int order)
12801280
{
12811281
struct xfs_inode *ip = XFS_I(file_inode(vmf->vma->vm_file));
1282-
unsigned int lock_mode;
12831282
vm_fault_t ret;
12841283

1285-
lock_mode = xfs_ilock_for_write_fault(ip);
1284+
xfs_ilock(ip, XFS_MMAPLOCK_SHARED);
12861285
ret = xfs_dax_fault_locked(vmf, order, false);
1287-
xfs_iunlock(ip, lock_mode);
1286+
xfs_iunlock(ip, XFS_MMAPLOCK_SHARED);
12881287

12891288
return ret;
12901289
}

0 commit comments

Comments
 (0)