summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-07-13 21:14:34 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2017-07-13 23:55:05 +0200
commit29db2500f6a92d63834a40c5e9eebab34c78c53a (patch)
treeb0a49e2cfa24d23705f8849b9b989bf0e5cb3519 /fs/xfs
parentxfs: assert locking precondŃ–tion in xfs_attr_list_int_ilocked (diff)
downloadlinux-29db2500f6a92d63834a40c5e9eebab34c78c53a.tar.xz
linux-29db2500f6a92d63834a40c5e9eebab34c78c53a.zip
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_symlink.c2
1 files changed, 2 insertions, 0 deletions
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)