diff options
Diffstat (limited to 'fs/xfs/quota/xfs_qm.c')
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index d488645f833d..35582fe9d648 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -310,7 +310,6 @@ xfs_qm_mount_quotas( | |||
310 | xfs_mount_t *mp, | 310 | xfs_mount_t *mp, |
311 | int mfsi_flags) | 311 | int mfsi_flags) |
312 | { | 312 | { |
313 | unsigned long s; | ||
314 | int error = 0; | 313 | int error = 0; |
315 | uint sbf; | 314 | uint sbf; |
316 | 315 | ||
@@ -367,13 +366,13 @@ xfs_qm_mount_quotas( | |||
367 | 366 | ||
368 | write_changes: | 367 | write_changes: |
369 | /* | 368 | /* |
370 | * We actually don't have to acquire the SB_LOCK at all. | 369 | * We actually don't have to acquire the m_sb_lock at all. |
371 | * This can only be called from mount, and that's single threaded. XXX | 370 | * This can only be called from mount, and that's single threaded. XXX |
372 | */ | 371 | */ |
373 | s = XFS_SB_LOCK(mp); | 372 | spin_lock(&mp->m_sb_lock); |
374 | sbf = mp->m_sb.sb_qflags; | 373 | sbf = mp->m_sb.sb_qflags; |
375 | mp->m_sb.sb_qflags = mp->m_qflags & XFS_MOUNT_QUOTA_ALL; | 374 | mp->m_sb.sb_qflags = mp->m_qflags & XFS_MOUNT_QUOTA_ALL; |
376 | XFS_SB_UNLOCK(mp, s); | 375 | spin_unlock(&mp->m_sb_lock); |
377 | 376 | ||
378 | if (sbf != (mp->m_qflags & XFS_MOUNT_QUOTA_ALL)) { | 377 | if (sbf != (mp->m_qflags & XFS_MOUNT_QUOTA_ALL)) { |
379 | if (xfs_qm_write_sb_changes(mp, XFS_SB_QFLAGS)) { | 378 | if (xfs_qm_write_sb_changes(mp, XFS_SB_QFLAGS)) { |
@@ -1139,7 +1138,7 @@ xfs_qm_init_quotainfo( | |||
1139 | return error; | 1138 | return error; |
1140 | } | 1139 | } |
1141 | 1140 | ||
1142 | spinlock_init(&qinf->qi_pinlock, "xfs_qinf_pin"); | 1141 | spin_lock_init(&qinf->qi_pinlock); |
1143 | xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0); | 1142 | xfs_qm_list_init(&qinf->qi_dqlist, "mpdqlist", 0); |
1144 | qinf->qi_dqreclaims = 0; | 1143 | qinf->qi_dqreclaims = 0; |
1145 | 1144 | ||
@@ -1370,7 +1369,6 @@ xfs_qm_qino_alloc( | |||
1370 | { | 1369 | { |
1371 | xfs_trans_t *tp; | 1370 | xfs_trans_t *tp; |
1372 | int error; | 1371 | int error; |
1373 | unsigned long s; | ||
1374 | int committed; | 1372 | int committed; |
1375 | 1373 | ||
1376 | tp = xfs_trans_alloc(mp, XFS_TRANS_QM_QINOCREATE); | 1374 | tp = xfs_trans_alloc(mp, XFS_TRANS_QM_QINOCREATE); |
@@ -1402,7 +1400,7 @@ xfs_qm_qino_alloc( | |||
1402 | * sbfields arg may contain fields other than *QUOTINO; | 1400 | * sbfields arg may contain fields other than *QUOTINO; |
1403 | * VERSIONNUM for example. | 1401 | * VERSIONNUM for example. |
1404 | */ | 1402 | */ |
1405 | s = XFS_SB_LOCK(mp); | 1403 | spin_lock(&mp->m_sb_lock); |
1406 | if (flags & XFS_QMOPT_SBVERSION) { | 1404 | if (flags & XFS_QMOPT_SBVERSION) { |
1407 | #if defined(DEBUG) && defined(XFS_LOUD_RECOVERY) | 1405 | #if defined(DEBUG) && defined(XFS_LOUD_RECOVERY) |
1408 | unsigned oldv = mp->m_sb.sb_versionnum; | 1406 | unsigned oldv = mp->m_sb.sb_versionnum; |
@@ -1429,7 +1427,7 @@ xfs_qm_qino_alloc( | |||
1429 | mp->m_sb.sb_uquotino = (*ip)->i_ino; | 1427 | mp->m_sb.sb_uquotino = (*ip)->i_ino; |
1430 | else | 1428 | else |
1431 | mp->m_sb.sb_gquotino = (*ip)->i_ino; | 1429 | mp->m_sb.sb_gquotino = (*ip)->i_ino; |
1432 | XFS_SB_UNLOCK(mp, s); | 1430 | spin_unlock(&mp->m_sb_lock); |
1433 | xfs_mod_sb(tp, sbfields); | 1431 | xfs_mod_sb(tp, sbfields); |
1434 | 1432 | ||
1435 | if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES))) { | 1433 | if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES))) { |