xfs: fix quota accounting when a mount is idmapped
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Mar 2021 17:32:52 +0000 (09:32 -0800)
committerDarrick J. Wong <djwong@djwong.org>
Tue, 9 Mar 2021 17:48:34 +0000 (09:48 -0800)
commitb5a08423da9da59c7f38ed8dbb6dd6cbbe9024a4
tree245bbc02ddf3cd6b0abba40d93aa2651a92d158a
parenta38fd8748464831584a19438cbb3082b5a2dab15
xfs: fix quota accounting when a mount is idmapped

Nowadays, we indirectly use the idmap-aware helper functions in the VFS
to set the initial uid and gid of a file being created.  Unfortunately,
we didn't convert the quota code, which means we attach the wrong dquots
to files created on an idmapped mount.

Fixes: f736d93d76d3 ("xfs: support idmapped mounts")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_inode.c
fs/xfs/xfs_symlink.c