Skip to content

Commit

Permalink
[XFS] Invalidate quotacheck when mounting without a quota type.
Browse files Browse the repository at this point in the history
When quotas are mounted or remounted without a particular quota type the
quota accounting for that type becomes invalid. Previously we were
ignoring this leading to accounting errors.

SGI-PV: 961964
SGI-Modid: xfs-linux-melb:xfs-kern:28225a

Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Utako Kusaka <utako@tnes.nec.co.jp>
Signed-off-by: Vlad Apostolov <vapo@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
  • Loading branch information
Donald Douwsma authored and Tim Shimmin committed May 8, 2007
1 parent e7a23a9 commit 646d5bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fs/xfs/quota/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ xfs_qm_mount_quotas(
return XFS_ERROR(error);
}
}
/*
* If one type of quotas is off, then it will lose its
* quotachecked status, since we won't be doing accounting for
* that type anymore.
*/
if (!XFS_IS_UQUOTA_ON(mp)) {
mp->m_qflags &= ~XFS_UQUOTA_CHKD;
}
if (!(XFS_IS_GQUOTA_ON(mp) || XFS_IS_PQUOTA_ON(mp))) {
mp->m_qflags &= ~XFS_OQUOTA_CHKD;
}

write_changes:
/*
Expand Down

0 comments on commit 646d5bd

Please sign in to comment.