aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2007-10-11 03:42:32 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 00:47:15 -0500
commit3685c2a1d773781608c9e281a6ff6b4c8ea8f6f9 (patch)
treef3d3a45002e64c8204de0db66bad2db1b73b5844 /fs/xfs/xfs_fsops.c
parentba74d0cba51dcaa99e4dc2e4fb62e6e13abbf703 (diff)
[XFS] Unwrap XFS_SB_LOCK.
Un-obfuscate XFS_SB_LOCK, remove XFS_SB_LOCK->mutex_lock->spin_lock macros, call spin_lock directly, remove extraneous cookie holdover from old xfs code, and change lock type to spinlock_t. SGI-PV: 970382 SGI-Modid: xfs-linux-melb:xfs-kern:29746a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Donald Douwsma <donaldd@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r--fs/xfs/xfs_fsops.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index c92d5b821029..b8de7f3cc17e 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -462,15 +462,13 @@ xfs_fs_counts(
462 xfs_mount_t *mp, 462 xfs_mount_t *mp,
463 xfs_fsop_counts_t *cnt) 463 xfs_fsop_counts_t *cnt)
464{ 464{
465 unsigned long s;
466
467 xfs_icsb_sync_counters_flags(mp, XFS_ICSB_LAZY_COUNT); 465 xfs_icsb_sync_counters_flags(mp, XFS_ICSB_LAZY_COUNT);
468 s = XFS_SB_LOCK(mp); 466 spin_lock(&mp->m_sb_lock);
469 cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); 467 cnt->freedata = mp->m_sb.sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
470 cnt->freertx = mp->m_sb.sb_frextents; 468 cnt->freertx = mp->m_sb.sb_frextents;
471 cnt->freeino = mp->m_sb.sb_ifree; 469 cnt->freeino = mp->m_sb.sb_ifree;
472 cnt->allocino = mp->m_sb.sb_icount; 470 cnt->allocino = mp->m_sb.sb_icount;
473 XFS_SB_UNLOCK(mp, s); 471 spin_unlock(&mp->m_sb_lock);
474 return 0; 472 return 0;
475} 473}
476 474
@@ -497,7 +495,6 @@ xfs_reserve_blocks(
497{ 495{
498 __int64_t lcounter, delta, fdblks_delta; 496 __int64_t lcounter, delta, fdblks_delta;
499 __uint64_t request; 497 __uint64_t request;
500 unsigned long s;
501 498
502 /* If inval is null, report current values and return */ 499 /* If inval is null, report current values and return */
503 if (inval == (__uint64_t *)NULL) { 500 if (inval == (__uint64_t *)NULL) {
@@ -515,7 +512,7 @@ xfs_reserve_blocks(
515 * problem. we needto work out if we are freeing or allocation 512 * problem. we needto work out if we are freeing or allocation
516 * blocks first, then we can do the modification as necessary. 513 * blocks first, then we can do the modification as necessary.
517 * 514 *
518 * We do this under the XFS_SB_LOCK so that if we are near 515 * We do this under the m_sb_lock so that if we are near
519 * ENOSPC, we will hold out any changes while we work out 516 * ENOSPC, we will hold out any changes while we work out
520 * what to do. This means that the amount of free space can 517 * what to do. This means that the amount of free space can
521 * change while we do this, so we need to retry if we end up 518 * change while we do this, so we need to retry if we end up
@@ -526,7 +523,7 @@ xfs_reserve_blocks(
526 * enabled, disabled or even compiled in.... 523 * enabled, disabled or even compiled in....
527 */ 524 */
528retry: 525retry:
529 s = XFS_SB_LOCK(mp); 526 spin_lock(&mp->m_sb_lock);
530 xfs_icsb_sync_counters_flags(mp, XFS_ICSB_SB_LOCKED); 527 xfs_icsb_sync_counters_flags(mp, XFS_ICSB_SB_LOCKED);
531 528
532 /* 529 /*
@@ -569,7 +566,7 @@ out:
569 outval->resblks = mp->m_resblks; 566 outval->resblks = mp->m_resblks;
570 outval->resblks_avail = mp->m_resblks_avail; 567 outval->resblks_avail = mp->m_resblks_avail;
571 } 568 }
572 XFS_SB_UNLOCK(mp, s); 569 spin_unlock(&mp->m_sb_lock);
573 570
574 if (fdblks_delta) { 571 if (fdblks_delta) {
575 /* 572 /*