瀏覽代碼

xfs: assert locking precondіtion in xfs_attr_list_int_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>
Christoph Hellwig 8 年之前
父節點
當前提交
5af7777e11
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/xfs/xfs_attr_list.c

+ 2 - 0
fs/xfs/xfs_attr_list.c

@@ -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.
 	 */