Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09ac8623 authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: call xfs_qm_dqattach before performing reflink operations



Ensure that we've attached all the necessary dquots before performing
reflink operations so that quota accounting is accurate.

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 6ca30729
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1295,6 +1295,11 @@ xfs_reflink_remap_range(
	if (ret <= 0)
		goto out_unlock;

	/* Attach dquots to dest inode before changing block map */
	ret = xfs_qm_dqattach(dest, 0);
	if (ret)
		goto out_unlock;

	trace_xfs_reflink_remap_range(src, pos_in, len, dest, pos_out);

	/*