From 9bdd6236879ea379758f82ad5cec7033f0a751ac Mon Sep 17 00:00:00 2001 From: jkar8572 Date: Tue, 12 Nov 2002 17:02:59 +0000 Subject: Commited XFS patch by Christoph Hellwig --- quotasys.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'quotasys.c') diff --git a/quotasys.c b/quotasys.c index 3272b70..7c51a1e 100644 --- a/quotasys.c +++ b/quotasys.c @@ -328,7 +328,6 @@ static int hasxfsquota(struct mntent *mnt, int type) int ret = 0; u_int16_t sbflags; struct xfs_mem_dqinfo info; - int nonrootfs = strcmp(mnt->mnt_dir, "/"); const char *dev = get_device_name(mnt->mnt_fsname); if (!dev) @@ -341,12 +340,19 @@ static int hasxfsquota(struct mntent *mnt, int type) ret = 1; else if (type == GRPQUOTA && (info.qs_flags & XFS_QUOTA_GDQ_ACCT)) ret = 1; - else if (nonrootfs) +#ifdef XFS_ROOTHACK + /* + * Old XFS filesystems (up to XFS 1.2 / Linux 2.5.47) had a + * hack to allow enabling quota on the root filesystem without + * having to specify it at mount time. + */ + else if (strcmp(mnt->mnt_dir, "/")) ret = 0; else if (type == USRQUOTA && (sbflags & XFS_QUOTA_UDQ_ACCT)) ret = 1; else if (type == GRPQUOTA && (sbflags & XFS_QUOTA_GDQ_ACCT)) ret = 1; +#endif /* XFS_ROOTHACK */ } free((char *)dev); return ret; -- cgit v1.2.3