aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_mount.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 2b0ba3581656..7263e1bb59f7 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -572,6 +572,24 @@ out_unwind:
572static void 572static void
573xfs_sb_quota_from_disk(struct xfs_sb *sbp) 573xfs_sb_quota_from_disk(struct xfs_sb *sbp)
574{ 574{
575 /*
576 * older mkfs doesn't initialize quota inodes to NULLFSINO. This
577 * leads to in-core values having two different values for a quota
578 * inode to be invalid: 0 and NULLFSINO. Change it to a single value
579 * NULLFSINO.
580 *
581 * Note that this change affect only the in-core values. These
582 * values are not written back to disk unless any quota information
583 * is written to the disk. Even in that case, sb_pquotino field is
584 * not written to disk unless the superblock supports pquotino.
585 */
586 if (sbp->sb_uquotino == 0)
587 sbp->sb_uquotino = NULLFSINO;
588 if (sbp->sb_gquotino == 0)
589 sbp->sb_gquotino = NULLFSINO;
590 if (sbp->sb_pquotino == 0)
591 sbp->sb_pquotino = NULLFSINO;
592
575 if (sbp->sb_qflags & XFS_OQUOTA_ENFD) 593 if (sbp->sb_qflags & XFS_OQUOTA_ENFD)
576 sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ? 594 sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ?
577 XFS_PQUOTA_ENFD : XFS_GQUOTA_ENFD; 595 XFS_PQUOTA_ENFD : XFS_GQUOTA_ENFD;