X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fxfs%2Fquota%2Fxfs_qm_bhv.c;h=be67d9c265f8ffc762f83f0081177f3e73bd1a3b;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=96b1d580c46a704fc42f46b87b94fcdfed149f63;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index 96b1d580c..be67d9c26 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -207,10 +207,9 @@ xfs_qm_syncall( } /* - * When xfsquotas isn't installed and the superblock had quotas, we need to - * clear the quotaflags from superblock. + * Clear the quotaflags in memory and in the superblock. */ -STATIC void +void xfs_mount_reset_sbqflags( xfs_mount_t *mp) { @@ -241,6 +240,8 @@ xfs_mount_reset_sbqflags( if (xfs_trans_reserve(tp, 0, mp->m_sb.sb_sectsize + 128, 0, 0, XFS_DEFAULT_LOG_COUNT)) { xfs_trans_cancel(tp, 0); + xfs_fs_cmn_err(CE_ALERT, mp, + "xfs_mount_reset_sbqflags: Superblock update failed!"); return; } xfs_mod_sb(tp, XFS_SB_QFLAGS); @@ -294,15 +295,12 @@ xfs_qm_newmount( */ if (quotaondisk && !XFS_QM_NEED_QUOTACHECK(mp)) { /* - * If the xfs quota code isn't installed, - * we have to reset the quotachk'd bit. * If an error occured, qm_mount_quotas code * has already disabled quotas. So, just finish * mounting, and get on with the boring life * without disk quotas. */ - if (xfs_qm_mount_quotas(mp)) - xfs_mount_reset_sbqflags(mp); + xfs_qm_mount_quotas(mp, 0); } else { /* * Clear the quota flags, but remember them. This @@ -324,13 +322,13 @@ STATIC int xfs_qm_endmount( xfs_mount_t *mp, uint needquotamount, - uint quotaflags) + uint quotaflags, + int mfsi_flags) { if (needquotamount) { ASSERT(mp->m_qflags == 0); mp->m_qflags = quotaflags; - if (xfs_qm_mount_quotas(mp)) - xfs_mount_reset_sbqflags(mp); + xfs_qm_mount_quotas(mp, mfsi_flags); } #if defined(DEBUG) && defined(XFS_LOUD_RECOVERY)