summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode_fork.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2013-12-06 12:30:17 -0800
committerBen Myers <bpm@sgi.com>2013-12-18 16:08:46 -0600
commiteef334e5776c8ef547ada4cec17549929fe590b4 (patch)
treecf6d3e90b0923494d9201c134e89dd5122cece98 /fs/xfs/xfs_inode_fork.c
parent568d994e9f53657cb6b3e9c95a83c130d36f83c9 (diff)
downloadop-kernel-dev-eef334e5776c8ef547ada4cec17549929fe590b4.zip
op-kernel-dev-eef334e5776c8ef547ada4cec17549929fe590b4.tar.gz
xfs: assert that we hold the ilock for extent map access
Make sure that xfs_bmapi_read has the ilock held in some way, and that xfs_bmapi_write, xfs_bmapi_delay, xfs_bunmapi and xfs_iread_extents are called with the ilock held exclusively. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode_fork.c')
-rw-r--r--fs/xfs/xfs_inode_fork.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode_fork.c b/fs/xfs/xfs_inode_fork.c
index cfee14a..e16985e 100644
--- a/fs/xfs/xfs_inode_fork.c
+++ b/fs/xfs/xfs_inode_fork.c
@@ -431,6 +431,8 @@ xfs_iread_extents(
xfs_ifork_t *ifp;
xfs_extnum_t nextents;
+ ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
+
if (unlikely(XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE)) {
XFS_ERROR_REPORT("xfs_iread_extents", XFS_ERRLEVEL_LOW,
ip->i_mount);
OpenPOWER on IntegriCloud