xfs: add asserts for the mmap lock in xfs_{insert,collapse}_file_space
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>
This commit is contained in:
parent
29b3e94a9c
commit
9ad1a23afb
@ -1334,6 +1334,8 @@ xfs_collapse_file_space(
|
||||
bool done = false;
|
||||
|
||||
ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
|
||||
ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
|
||||
|
||||
trace_xfs_collapse_file_space(ip);
|
||||
|
||||
error = xfs_free_file_space(ip, offset, len);
|
||||
@ -1408,6 +1410,8 @@ xfs_insert_file_space(
|
||||
bool done = false;
|
||||
|
||||
ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL));
|
||||
ASSERT(xfs_isilocked(ip, XFS_MMAPLOCK_EXCL));
|
||||
|
||||
trace_xfs_insert_file_space(ip);
|
||||
|
||||
error = xfs_prepare_shift(ip, offset);
|
||||
|
Loading…
Reference in New Issue
Block a user