aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-10-16 09:21:05 -0700
committerDarrick J. Wong <djwong@kernel.org>2023-10-17 16:22:40 -0700
commitb73494fa9a304ab95b59f07845e8d7d36e4d23e0 (patch)
treee5a37b7c4686ca202f16f17cbcffd017e2a67fee /fs/xfs/xfs_rtalloc.c
parentxfs: hoist freeing of rt data fork extent mappings (diff)
downloadwireguard-linux-b73494fa9a304ab95b59f07845e8d7d36e4d23e0.tar.xz
wireguard-linux-b73494fa9a304ab95b59f07845e8d7d36e4d23e0.zip
xfs: prevent rt growfs when quota is enabled
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>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 16534e9873f6..31fd65b3aaa9 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -954,7 +954,7 @@ xfs_growfs_rt(
return -EINVAL;
/* Unsupported realtime features. */
- if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
+ if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp) || xfs_has_quota(mp))
return -EOPNOTSUPP;
nrblocks = in->newblocks;