Skip to content

Commit 29db250

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: assert locking precondition in xfs_readlink_bmap_ilocked
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>
1 parent 5af7777 commit 29db250

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/xfs/xfs_symlink.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ xfs_readlink_bmap_ilocked(
6161
int fsblocks = 0;
6262
int offset;
6363

64+
ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL));
65+
6466
fsblocks = xfs_symlink_blocks(mp, pathlen);
6567
error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0);
6668
if (error)

0 commit comments

Comments
 (0)