Commit 29db2500 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: assert locking precondition in xfs_readlink_bmap_ilocked

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 5af7777e
...@@ -61,6 +61,8 @@ xfs_readlink_bmap_ilocked( ...@@ -61,6 +61,8 @@ xfs_readlink_bmap_ilocked(
int fsblocks = 0; int fsblocks = 0;
int offset; int offset;
ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL));
fsblocks = xfs_symlink_blocks(mp, pathlen); fsblocks = xfs_symlink_blocks(mp, pathlen);
error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0); error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment