xfs: prevent rt growfs when quota is enabled
authorDarrick J. Wong <djwong@kernel.org>
Thu, 8 Feb 2024 23:20:37 +0000 (15:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:44 +0000 (19:10 +0100)
commit6a6bb41b31df768ba75c6224ed9f30ad5b548a5d
tree7ddbe82a4e94c22278deb677902ba82a5a58d45f
parente820b13ba866ae50c9ea6c3911babdeafc7ab681
xfs: prevent rt growfs when quota is enabled

commit b73494fa9a304ab95b59f07845e8d7d36e4d23e0 upstream.

Quotas aren't (yet) supported with realtime, so we shouldn't allow
userspace to set up a realtime section when quotas are enabled, even if
they attached one via mount options.  IOWS, you shouldn't be able to do:

# mkfs.xfs -f /dev/sda
# mount /dev/sda /mnt -o rtdev=/dev/sdb,usrquota
# xfs_growfs -r /mnt

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Acked-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_rtalloc.c