Skip to content

Commit 82af880

Browse files
kaixuxiakxDarrick J. Wong
authored andcommitted
xfs: use invalidate_lock to check the state of mmap_lock
We should use invalidate_lock and XFS_MMAPLOCK_SHARED to check the state of mmap_lock rw_semaphore in xfs_isilocked(), rather than i_rwsem and XFS_IOLOCK_SHARED. Fixes: 2433480 ("xfs: Convert to use invalidate_lock") Signed-off-by: Kaixu Xia <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent ca76a76 commit 82af880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/xfs/xfs_inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ xfs_isilocked(
365365
}
366366

367367
if (lock_flags & (XFS_MMAPLOCK_EXCL|XFS_MMAPLOCK_SHARED)) {
368-
return __xfs_rwsem_islocked(&VFS_I(ip)->i_rwsem,
369-
(lock_flags & XFS_IOLOCK_SHARED));
368+
return __xfs_rwsem_islocked(&VFS_I(ip)->i_mapping->invalidate_lock,
369+
(lock_flags & XFS_MMAPLOCK_SHARED));
370370
}
371371

372372
if (lock_flags & (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED)) {

0 commit comments

Comments
 (0)