aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:20:31 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 21:57:05 -0400
commit53aa7915d67b9d0f5986c9f08e76846fedc520d4 (patch)
treed80c449c1369de8bb92a8abe34506f2810732227 /fs/xfs
parent3c56836f92683cb871ebbf44c512069b0d48a08f (diff)
[XFS] Clean up quotamount error handling.
xfs_qm_mount_quotas() returns an error status that is ignored. If we fail to mount quotas, we continue with quota's turned off, which is all handled inside xfs_qm_mount_quotas(). Mark it as void to indicate that errors need not be returned to the callers. SGI-PV: 980084 SGI-Modid: xfs-linux-melb:xfs-kern:30788a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/quota/xfs_qm.c28
-rw-r--r--fs/xfs/quota/xfs_qm.h2
2 files changed, 15 insertions, 15 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 0ed3c8277fcd..e15ee7cf3ccd 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -304,8 +304,11 @@ xfs_qm_unmount_quotadestroy(
304 * necessary data structures like quotainfo. This is also responsible for 304 * necessary data structures like quotainfo. This is also responsible for
305 * running a quotacheck as necessary. We are guaranteed that the superblock 305 * running a quotacheck as necessary. We are guaranteed that the superblock
306 * is consistently read in at this point. 306 * is consistently read in at this point.
307 *
308 * If we fail here, the mount will continue with quota turned off. We don't
309 * need to inidicate success or failure at all.
307 */ 310 */
308int 311void
309xfs_qm_mount_quotas( 312xfs_qm_mount_quotas(
310 xfs_mount_t *mp, 313 xfs_mount_t *mp,
311 int mfsi_flags) 314 int mfsi_flags)
@@ -313,7 +316,6 @@ xfs_qm_mount_quotas(
313 int error = 0; 316 int error = 0;
314 uint sbf; 317 uint sbf;
315 318
316
317 /* 319 /*
318 * If quotas on realtime volumes is not supported, we disable 320 * If quotas on realtime volumes is not supported, we disable
319 * quotas immediately. 321 * quotas immediately.
@@ -332,7 +334,8 @@ xfs_qm_mount_quotas(
332 * Allocate the quotainfo structure inside the mount struct, and 334 * Allocate the quotainfo structure inside the mount struct, and
333 * create quotainode(s), and change/rev superblock if necessary. 335 * create quotainode(s), and change/rev superblock if necessary.
334 */ 336 */
335 if ((error = xfs_qm_init_quotainfo(mp))) { 337 error = xfs_qm_init_quotainfo(mp);
338 if (error) {
336 /* 339 /*
337 * We must turn off quotas. 340 * We must turn off quotas.
338 */ 341 */
@@ -344,12 +347,11 @@ xfs_qm_mount_quotas(
344 * If any of the quotas are not consistent, do a quotacheck. 347 * If any of the quotas are not consistent, do a quotacheck.
345 */ 348 */
346 if (XFS_QM_NEED_QUOTACHECK(mp) && 349 if (XFS_QM_NEED_QUOTACHECK(mp) &&
347 !(mfsi_flags & XFS_MFSI_NO_QUOTACHECK)) { 350 !(mfsi_flags & XFS_MFSI_NO_QUOTACHECK)) {
348 if ((error = xfs_qm_quotacheck(mp))) { 351 error = xfs_qm_quotacheck(mp);
349 /* Quotacheck has failed and quotas have 352 if (error) {
350 * been disabled. 353 /* Quotacheck failed and disabled quotas. */
351 */ 354 return;
352 return XFS_ERROR(error);
353 } 355 }
354 } 356 }
355 /* 357 /*
@@ -357,12 +359,10 @@ xfs_qm_mount_quotas(
357 * quotachecked status, since we won't be doing accounting for 359 * quotachecked status, since we won't be doing accounting for
358 * that type anymore. 360 * that type anymore.
359 */ 361 */
360 if (!XFS_IS_UQUOTA_ON(mp)) { 362 if (!XFS_IS_UQUOTA_ON(mp))
361 mp->m_qflags &= ~XFS_UQUOTA_CHKD; 363 mp->m_qflags &= ~XFS_UQUOTA_CHKD;
362 } 364 if (!(XFS_IS_GQUOTA_ON(mp) || XFS_IS_PQUOTA_ON(mp)))
363 if (!(XFS_IS_GQUOTA_ON(mp) || XFS_IS_PQUOTA_ON(mp))) {
364 mp->m_qflags &= ~XFS_OQUOTA_CHKD; 365 mp->m_qflags &= ~XFS_OQUOTA_CHKD;
365 }
366 366
367 write_changes: 367 write_changes:
368 /* 368 /*
@@ -392,7 +392,7 @@ xfs_qm_mount_quotas(
392 xfs_fs_cmn_err(CE_WARN, mp, 392 xfs_fs_cmn_err(CE_WARN, mp,
393 "Failed to initialize disk quotas."); 393 "Failed to initialize disk quotas.");
394 } 394 }
395 return XFS_ERROR(error); 395 return;
396} 396}
397 397
398/* 398/*
diff --git a/fs/xfs/quota/xfs_qm.h b/fs/xfs/quota/xfs_qm.h
index baf537c1c177..cd2300e374af 100644
--- a/fs/xfs/quota/xfs_qm.h
+++ b/fs/xfs/quota/xfs_qm.h
@@ -165,7 +165,7 @@ typedef struct xfs_dquot_acct {
165#define XFS_QM_RELE(xqm) ((xqm)->qm_nrefs--) 165#define XFS_QM_RELE(xqm) ((xqm)->qm_nrefs--)
166 166
167extern void xfs_qm_destroy_quotainfo(xfs_mount_t *); 167extern void xfs_qm_destroy_quotainfo(xfs_mount_t *);
168extern int xfs_qm_mount_quotas(xfs_mount_t *, int); 168extern void xfs_qm_mount_quotas(xfs_mount_t *, int);
169extern int xfs_qm_quotacheck(xfs_mount_t *); 169extern int xfs_qm_quotacheck(xfs_mount_t *);
170extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *); 170extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *);
171extern int xfs_qm_unmount_quotas(xfs_mount_t *); 171extern int xfs_qm_unmount_quotas(xfs_mount_t *);