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: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
上级 6ca30729
......@@ -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);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部