From: Christoph Hellwig Date: Wed, 14 Mar 2018 06:15:31 +0000 (-0700) Subject: xfs: assert that xfs_reflink_allocate_cow is called with XFS_ILOCK_EXCL X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c7dbe3f2c41969845b8ea000fc5e025d4987a8fb;p=linux.git xfs: assert that xfs_reflink_allocate_cow is called with XFS_ILOCK_EXCL Now that we convert COW preallocations from unwritten to real on every call this function needs to be called with the ilock held exclusively. Fortunately we already do that, but update the assert to match. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index d81c4f868d695..90aac8889dd92 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -394,7 +394,7 @@ xfs_reflink_allocate_cow( retry: ASSERT(xfs_is_reflink_inode(ip)); - ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL | XFS_ILOCK_SHARED)); + ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); /* * Even if the extent is not shared we might have a preallocation for