From: Christoph Hellwig Date: Thu, 13 Jul 2017 19:14:34 +0000 (-0700) Subject: xfs: assert locking precondition in xfs_readlink_bmap_ilocked X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29db2500f6a92d63834a40c5e9eebab34c78c53a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git xfs: assert locking precondition in xfs_readlink_bmap_ilocked Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c index 12cd9cf7de41..23a50d7aa46a 100644 --- a/fs/xfs/xfs_symlink.c +++ b/fs/xfs/xfs_symlink.c @@ -61,6 +61,8 @@ xfs_readlink_bmap_ilocked( int fsblocks = 0; int offset; + ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL)); + fsblocks = xfs_symlink_blocks(mp, pathlen); error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0); if (error)