xfs: assert locking precondŃ–tion in xfs_attr_list_int_ilocked
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Jul 2017 19:14:33 +0000 (12:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 13 Jul 2017 21:55:05 +0000 (14:55 -0700)
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>
fs/xfs/xfs_attr_list.c

index 545eca508d42f51fdb0251ca29755c977bcd3b8e..7740c8a5e7369de93caa93cabed20745ad35d6f5 100644 (file)
@@ -463,6 +463,8 @@ xfs_attr_list_int_ilocked(
 {
        struct xfs_inode                *dp = context->dp;
 
+       ASSERT(xfs_isilocked(dp, XFS_ILOCK_SHARED | XFS_ILOCK_EXCL));
+
        /*
         * Decide on what work routines to call based on the inode size.
         */