diff options
author | jkar8572 <jkar8572> | 2002-11-12 17:02:59 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2002-11-12 17:02:59 +0000 |
commit | 9bdd6236879ea379758f82ad5cec7033f0a751ac (patch) | |
tree | 87405ba01393a506d51f676766d0be96bc56d50a /quotasys.c | |
parent | f99565556d35c0a5800b39386e4b507ae3563bba (diff) |
Commited XFS patch by Christoph Hellwig
Diffstat (limited to 'quotasys.c')
-rw-r--r-- | quotasys.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; |