aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota/xfs_qm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/quota/xfs_qm.c')
-rw-r--r--fs/xfs/quota/xfs_qm.c114
1 files changed, 57 insertions, 57 deletions
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c
index 7dcdd0640c32..8d5886020107 100644
--- a/fs/xfs/quota/xfs_qm.c
+++ b/fs/xfs/quota/xfs_qm.c
@@ -497,7 +497,7 @@ xfs_qm_dqflush_all(
497 int error; 497 int error;
498 498
499 if (mp->m_quotainfo == NULL) 499 if (mp->m_quotainfo == NULL)
500 return (0); 500 return 0;
501 niters = 0; 501 niters = 0;
502again: 502again:
503 xfs_qm_mplist_lock(mp); 503 xfs_qm_mplist_lock(mp);
@@ -528,7 +528,7 @@ again:
528 error = xfs_qm_dqflush(dqp, flags); 528 error = xfs_qm_dqflush(dqp, flags);
529 xfs_dqunlock(dqp); 529 xfs_dqunlock(dqp);
530 if (error) 530 if (error)
531 return (error); 531 return error;
532 532
533 xfs_qm_mplist_lock(mp); 533 xfs_qm_mplist_lock(mp);
534 if (recl != XFS_QI_MPLRECLAIMS(mp)) { 534 if (recl != XFS_QI_MPLRECLAIMS(mp)) {
@@ -540,7 +540,7 @@ again:
540 540
541 xfs_qm_mplist_unlock(mp); 541 xfs_qm_mplist_unlock(mp);
542 /* return ! busy */ 542 /* return ! busy */
543 return (0); 543 return 0;
544} 544}
545/* 545/*
546 * Release the group dquot pointers the user dquots may be 546 * Release the group dquot pointers the user dquots may be
@@ -599,7 +599,7 @@ xfs_qm_dqpurge_int(
599 int nmisses; 599 int nmisses;
600 600
601 if (mp->m_quotainfo == NULL) 601 if (mp->m_quotainfo == NULL)
602 return (0); 602 return 0;
603 603
604 dqtype = (flags & XFS_QMOPT_UQUOTA) ? XFS_DQ_USER : 0; 604 dqtype = (flags & XFS_QMOPT_UQUOTA) ? XFS_DQ_USER : 0;
605 dqtype |= (flags & XFS_QMOPT_PQUOTA) ? XFS_DQ_PROJ : 0; 605 dqtype |= (flags & XFS_QMOPT_PQUOTA) ? XFS_DQ_PROJ : 0;
@@ -796,7 +796,7 @@ xfs_qm_dqattach_one(
796 ASSERT(XFS_DQ_IS_LOCKED(dqp)); 796 ASSERT(XFS_DQ_IS_LOCKED(dqp));
797 } 797 }
798#endif 798#endif
799 return (error); 799 return error;
800} 800}
801 801
802 802
@@ -897,7 +897,7 @@ xfs_qm_dqattach(
897 (! XFS_NOT_DQATTACHED(mp, ip)) || 897 (! XFS_NOT_DQATTACHED(mp, ip)) ||
898 (ip->i_ino == mp->m_sb.sb_uquotino) || 898 (ip->i_ino == mp->m_sb.sb_uquotino) ||
899 (ip->i_ino == mp->m_sb.sb_gquotino)) 899 (ip->i_ino == mp->m_sb.sb_gquotino))
900 return (0); 900 return 0;
901 901
902 ASSERT((flags & XFS_QMOPT_ILOCKED) == 0 || 902 ASSERT((flags & XFS_QMOPT_ILOCKED) == 0 ||
903 XFS_ISLOCKED_INODE_EXCL(ip)); 903 XFS_ISLOCKED_INODE_EXCL(ip));
@@ -984,7 +984,7 @@ xfs_qm_dqattach(
984 else 984 else
985 ASSERT(XFS_ISLOCKED_INODE_EXCL(ip)); 985 ASSERT(XFS_ISLOCKED_INODE_EXCL(ip));
986#endif 986#endif
987 return (error); 987 return error;
988} 988}
989 989
990/* 990/*
@@ -1049,7 +1049,7 @@ xfs_qm_sync(
1049 */ 1049 */
1050 if (! XFS_IS_QUOTA_ON(mp)) { 1050 if (! XFS_IS_QUOTA_ON(mp)) {
1051 xfs_qm_mplist_unlock(mp); 1051 xfs_qm_mplist_unlock(mp);
1052 return (0); 1052 return 0;
1053 } 1053 }
1054 FOREACH_DQUOT_IN_MP(dqp, mp) { 1054 FOREACH_DQUOT_IN_MP(dqp, mp) {
1055 /* 1055 /*
@@ -1109,9 +1109,9 @@ xfs_qm_sync(
1109 error = xfs_qm_dqflush(dqp, flush_flags); 1109 error = xfs_qm_dqflush(dqp, flush_flags);
1110 xfs_dqunlock(dqp); 1110 xfs_dqunlock(dqp);
1111 if (error && XFS_FORCED_SHUTDOWN(mp)) 1111 if (error && XFS_FORCED_SHUTDOWN(mp))
1112 return(0); /* Need to prevent umount failure */ 1112 return 0; /* Need to prevent umount failure */
1113 else if (error) 1113 else if (error)
1114 return (error); 1114 return error;
1115 1115
1116 xfs_qm_mplist_lock(mp); 1116 xfs_qm_mplist_lock(mp);
1117 if (recl != XFS_QI_MPLRECLAIMS(mp)) { 1117 if (recl != XFS_QI_MPLRECLAIMS(mp)) {
@@ -1124,7 +1124,7 @@ xfs_qm_sync(
1124 } 1124 }
1125 1125
1126 xfs_qm_mplist_unlock(mp); 1126 xfs_qm_mplist_unlock(mp);
1127 return (0); 1127 return 0;
1128} 1128}
1129 1129
1130 1130
@@ -1146,7 +1146,7 @@ xfs_qm_init_quotainfo(
1146 * Tell XQM that we exist as soon as possible. 1146 * Tell XQM that we exist as soon as possible.
1147 */ 1147 */
1148 if ((error = xfs_qm_hold_quotafs_ref(mp))) { 1148 if ((error = xfs_qm_hold_quotafs_ref(mp))) {
1149 return (error); 1149 return error;
1150 } 1150 }
1151 1151
1152 qinf = mp->m_quotainfo = kmem_zalloc(sizeof(xfs_quotainfo_t), KM_SLEEP); 1152 qinf = mp->m_quotainfo = kmem_zalloc(sizeof(xfs_quotainfo_t), KM_SLEEP);
@@ -1158,7 +1158,7 @@ xfs_qm_init_quotainfo(
1158 if ((error = xfs_qm_init_quotainos(mp))) { 1158 if ((error = xfs_qm_init_quotainos(mp))) {
1159 kmem_free(qinf, sizeof(xfs_quotainfo_t)); 1159 kmem_free(qinf, sizeof(xfs_quotainfo_t));
1160 mp->m_quotainfo = NULL; 1160 mp->m_quotainfo = NULL;
1161 return (error); 1161 return error;
1162 } 1162 }
1163 1163
1164 spinlock_init(&qinf->qi_pinlock, "xfs_qinf_pin"); 1164 spinlock_init(&qinf->qi_pinlock, "xfs_qinf_pin");
@@ -1232,7 +1232,7 @@ xfs_qm_init_quotainfo(
1232 qinf->qi_rtbwarnlimit = XFS_QM_RTBWARNLIMIT; 1232 qinf->qi_rtbwarnlimit = XFS_QM_RTBWARNLIMIT;
1233 } 1233 }
1234 1234
1235 return (0); 1235 return 0;
1236} 1236}
1237 1237
1238 1238
@@ -1332,7 +1332,7 @@ xfs_qm_dqget_noattach(
1332 */ 1332 */
1333 ASSERT(error != ESRCH); 1333 ASSERT(error != ESRCH);
1334 ASSERT(error != ENOENT); 1334 ASSERT(error != ENOENT);
1335 return (error); 1335 return error;
1336 } 1336 }
1337 ASSERT(udqp); 1337 ASSERT(udqp);
1338 } 1338 }
@@ -1355,7 +1355,7 @@ xfs_qm_dqget_noattach(
1355 xfs_qm_dqrele(udqp); 1355 xfs_qm_dqrele(udqp);
1356 ASSERT(error != ESRCH); 1356 ASSERT(error != ESRCH);
1357 ASSERT(error != ENOENT); 1357 ASSERT(error != ENOENT);
1358 return (error); 1358 return error;
1359 } 1359 }
1360 ASSERT(gdqp); 1360 ASSERT(gdqp);
1361 1361
@@ -1376,7 +1376,7 @@ xfs_qm_dqget_noattach(
1376 if (udqp) ASSERT(XFS_DQ_IS_LOCKED(udqp)); 1376 if (udqp) ASSERT(XFS_DQ_IS_LOCKED(udqp));
1377 if (gdqp) ASSERT(XFS_DQ_IS_LOCKED(gdqp)); 1377 if (gdqp) ASSERT(XFS_DQ_IS_LOCKED(gdqp));
1378#endif 1378#endif
1379 return (0); 1379 return 0;
1380} 1380}
1381 1381
1382/* 1382/*
@@ -1404,7 +1404,7 @@ xfs_qm_qino_alloc(
1404 XFS_TRANS_PERM_LOG_RES, 1404 XFS_TRANS_PERM_LOG_RES,
1405 XFS_CREATE_LOG_COUNT))) { 1405 XFS_CREATE_LOG_COUNT))) {
1406 xfs_trans_cancel(tp, 0); 1406 xfs_trans_cancel(tp, 0);
1407 return (error); 1407 return error;
1408 } 1408 }
1409 memset(&zerocr, 0, sizeof(zerocr)); 1409 memset(&zerocr, 0, sizeof(zerocr));
1410 memset(&zeroino, 0, sizeof(zeroino)); 1410 memset(&zeroino, 0, sizeof(zeroino));
@@ -1413,7 +1413,7 @@ xfs_qm_qino_alloc(
1413 &zerocr, 0, 1, ip, &committed))) { 1413 &zerocr, 0, 1, ip, &committed))) {
1414 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | 1414 xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES |
1415 XFS_TRANS_ABORT); 1415 XFS_TRANS_ABORT);
1416 return (error); 1416 return error;
1417 } 1417 }
1418 1418
1419 /* 1419 /*
@@ -1461,9 +1461,9 @@ xfs_qm_qino_alloc(
1461 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, 1461 if ((error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES,
1462 NULL))) { 1462 NULL))) {
1463 xfs_fs_cmn_err(CE_ALERT, mp, "XFS qino_alloc failed!"); 1463 xfs_fs_cmn_err(CE_ALERT, mp, "XFS qino_alloc failed!");
1464 return (error); 1464 return error;
1465 } 1465 }
1466 return (0); 1466 return 0;
1467} 1467}
1468 1468
1469 1469
@@ -1508,7 +1508,7 @@ xfs_qm_reset_dqcounts(
1508 ddq = (xfs_disk_dquot_t *) ((xfs_dqblk_t *)ddq + 1); 1508 ddq = (xfs_disk_dquot_t *) ((xfs_dqblk_t *)ddq + 1);
1509 } 1509 }
1510 1510
1511 return (0); 1511 return 0;
1512} 1512}
1513 1513
1514STATIC int 1514STATIC int
@@ -1557,7 +1557,7 @@ xfs_qm_dqiter_bufs(
1557 bno++; 1557 bno++;
1558 firstid += XFS_QM_DQPERBLK(mp); 1558 firstid += XFS_QM_DQPERBLK(mp);
1559 } 1559 }
1560 return (error); 1560 return error;
1561} 1561}
1562 1562
1563/* 1563/*
@@ -1586,7 +1586,7 @@ xfs_qm_dqiterate(
1586 * happens only at mount time which is single threaded. 1586 * happens only at mount time which is single threaded.
1587 */ 1587 */
1588 if (qip->i_d.di_nblocks == 0) 1588 if (qip->i_d.di_nblocks == 0)
1589 return (0); 1589 return 0;
1590 1590
1591 map = kmem_alloc(XFS_DQITER_MAP_SIZE * sizeof(*map), KM_SLEEP); 1591 map = kmem_alloc(XFS_DQITER_MAP_SIZE * sizeof(*map), KM_SLEEP);
1592 1592
@@ -1655,7 +1655,7 @@ xfs_qm_dqiterate(
1655 1655
1656 kmem_free(map, XFS_DQITER_MAP_SIZE * sizeof(*map)); 1656 kmem_free(map, XFS_DQITER_MAP_SIZE * sizeof(*map));
1657 1657
1658 return (error); 1658 return error;
1659} 1659}
1660 1660
1661/* 1661/*
@@ -1715,7 +1715,7 @@ xfs_qm_get_rtblks(
1715 ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK); 1715 ifp = XFS_IFORK_PTR(ip, XFS_DATA_FORK);
1716 if (!(ifp->if_flags & XFS_IFEXTENTS)) { 1716 if (!(ifp->if_flags & XFS_IFEXTENTS)) {
1717 if ((error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK))) 1717 if ((error = xfs_iread_extents(NULL, ip, XFS_DATA_FORK)))
1718 return (error); 1718 return error;
1719 } 1719 }
1720 rtblks = 0; 1720 rtblks = 0;
1721 nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t); 1721 nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);
@@ -1723,7 +1723,7 @@ xfs_qm_get_rtblks(
1723 for (ep = base; ep < &base[nextents]; ep++) 1723 for (ep = base; ep < &base[nextents]; ep++)
1724 rtblks += xfs_bmbt_get_blockcount(ep); 1724 rtblks += xfs_bmbt_get_blockcount(ep);
1725 *O_rtblks = (xfs_qcnt_t)rtblks; 1725 *O_rtblks = (xfs_qcnt_t)rtblks;
1726 return (0); 1726 return 0;
1727} 1727}
1728 1728
1729/* 1729/*
@@ -1767,7 +1767,7 @@ xfs_qm_dqusage_adjust(
1767 */ 1767 */
1768 if ((error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_EXCL, &ip, bno))) { 1768 if ((error = xfs_iget(mp, NULL, ino, 0, XFS_ILOCK_EXCL, &ip, bno))) {
1769 *res = BULKSTAT_RV_NOTHING; 1769 *res = BULKSTAT_RV_NOTHING;
1770 return (error); 1770 return error;
1771 } 1771 }
1772 1772
1773 if (ip->i_d.di_mode == 0) { 1773 if (ip->i_d.di_mode == 0) {
@@ -1785,7 +1785,7 @@ xfs_qm_dqusage_adjust(
1785 if ((error = xfs_qm_dqget_noattach(ip, &udqp, &gdqp))) { 1785 if ((error = xfs_qm_dqget_noattach(ip, &udqp, &gdqp))) {
1786 xfs_iput(ip, XFS_ILOCK_EXCL); 1786 xfs_iput(ip, XFS_ILOCK_EXCL);
1787 *res = BULKSTAT_RV_GIVEUP; 1787 *res = BULKSTAT_RV_GIVEUP;
1788 return (error); 1788 return error;
1789 } 1789 }
1790 1790
1791 rtblks = 0; 1791 rtblks = 0;
@@ -1802,7 +1802,7 @@ xfs_qm_dqusage_adjust(
1802 if (gdqp) 1802 if (gdqp)
1803 xfs_qm_dqput(gdqp); 1803 xfs_qm_dqput(gdqp);
1804 *res = BULKSTAT_RV_GIVEUP; 1804 *res = BULKSTAT_RV_GIVEUP;
1805 return (error); 1805 return error;
1806 } 1806 }
1807 nblks = (xfs_qcnt_t)ip->i_d.di_nblocks - rtblks; 1807 nblks = (xfs_qcnt_t)ip->i_d.di_nblocks - rtblks;
1808 } 1808 }
@@ -1847,7 +1847,7 @@ xfs_qm_dqusage_adjust(
1847 * Goto next inode. 1847 * Goto next inode.
1848 */ 1848 */
1849 *res = BULKSTAT_RV_DIDONE; 1849 *res = BULKSTAT_RV_DIDONE;
1850 return (0); 1850 return 0;
1851} 1851}
1852 1852
1853/* 1853/*
@@ -2041,7 +2041,7 @@ xfs_qm_init_quotainos(
2041 XFS_QI_UQIP(mp) = uip; 2041 XFS_QI_UQIP(mp) = uip;
2042 XFS_QI_GQIP(mp) = gip; 2042 XFS_QI_GQIP(mp) = gip;
2043 2043
2044 return (0); 2044 return 0;
2045} 2045}
2046 2046
2047 2047
@@ -2062,7 +2062,7 @@ xfs_qm_shake_freelist(
2062 int nflushes; 2062 int nflushes;
2063 2063
2064 if (howmany <= 0) 2064 if (howmany <= 0)
2065 return (0); 2065 return 0;
2066 2066
2067 nreclaimed = 0; 2067 nreclaimed = 0;
2068 restarts = 0; 2068 restarts = 0;
@@ -2088,7 +2088,7 @@ xfs_qm_shake_freelist(
2088 xfs_dqunlock(dqp); 2088 xfs_dqunlock(dqp);
2089 xfs_qm_freelist_unlock(xfs_Gqm); 2089 xfs_qm_freelist_unlock(xfs_Gqm);
2090 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS) 2090 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
2091 return (nreclaimed); 2091 return nreclaimed;
2092 XQM_STATS_INC(xqmstats.xs_qm_dqwants); 2092 XQM_STATS_INC(xqmstats.xs_qm_dqwants);
2093 goto tryagain; 2093 goto tryagain;
2094 } 2094 }
@@ -2163,7 +2163,7 @@ xfs_qm_shake_freelist(
2163 XFS_DQ_HASH_UNLOCK(hash); 2163 XFS_DQ_HASH_UNLOCK(hash);
2164 xfs_qm_freelist_unlock(xfs_Gqm); 2164 xfs_qm_freelist_unlock(xfs_Gqm);
2165 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS) 2165 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
2166 return (nreclaimed); 2166 return nreclaimed;
2167 goto tryagain; 2167 goto tryagain;
2168 } 2168 }
2169 xfs_dqtrace_entry(dqp, "DQSHAKE: UNLINKING"); 2169 xfs_dqtrace_entry(dqp, "DQSHAKE: UNLINKING");
@@ -2188,7 +2188,7 @@ xfs_qm_shake_freelist(
2188 dqp = nextdqp; 2188 dqp = nextdqp;
2189 } 2189 }
2190 xfs_qm_freelist_unlock(xfs_Gqm); 2190 xfs_qm_freelist_unlock(xfs_Gqm);
2191 return (nreclaimed); 2191 return nreclaimed;
2192} 2192}
2193 2193
2194 2194
@@ -2202,9 +2202,9 @@ xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask)
2202 int ndqused, nfree, n; 2202 int ndqused, nfree, n;
2203 2203
2204 if (!kmem_shake_allow(gfp_mask)) 2204 if (!kmem_shake_allow(gfp_mask))
2205 return (0); 2205 return 0;
2206 if (!xfs_Gqm) 2206 if (!xfs_Gqm)
2207 return (0); 2207 return 0;
2208 2208
2209 nfree = xfs_Gqm->qm_dqfreelist.qh_nelems; /* free dquots */ 2209 nfree = xfs_Gqm->qm_dqfreelist.qh_nelems; /* free dquots */
2210 /* incore dquots in all f/s's */ 2210 /* incore dquots in all f/s's */
@@ -2213,7 +2213,7 @@ xfs_qm_shake(int nr_to_scan, gfp_t gfp_mask)
2213 ASSERT(ndqused >= 0); 2213 ASSERT(ndqused >= 0);
2214 2214
2215 if (nfree <= ndqused && nfree < ndquot) 2215 if (nfree <= ndqused && nfree < ndquot)
2216 return (0); 2216 return 0;
2217 2217
2218 ndqused *= xfs_Gqm->qm_dqfree_ratio; /* target # of free dquots */ 2218 ndqused *= xfs_Gqm->qm_dqfree_ratio; /* target # of free dquots */
2219 n = nfree - ndqused - ndquot; /* # over target */ 2219 n = nfree - ndqused - ndquot; /* # over target */
@@ -2257,7 +2257,7 @@ xfs_qm_dqreclaim_one(void)
2257 xfs_dqunlock(dqp); 2257 xfs_dqunlock(dqp);
2258 xfs_qm_freelist_unlock(xfs_Gqm); 2258 xfs_qm_freelist_unlock(xfs_Gqm);
2259 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS) 2259 if (++restarts >= XFS_QM_RECLAIM_MAX_RESTARTS)
2260 return (NULL); 2260 return NULL;
2261 XQM_STATS_INC(xqmstats.xs_qm_dqwants); 2261 XQM_STATS_INC(xqmstats.xs_qm_dqwants);
2262 goto startagain; 2262 goto startagain;
2263 } 2263 }
@@ -2333,7 +2333,7 @@ xfs_qm_dqreclaim_one(void)
2333 } 2333 }
2334 2334
2335 xfs_qm_freelist_unlock(xfs_Gqm); 2335 xfs_qm_freelist_unlock(xfs_Gqm);
2336 return (dqpout); 2336 return dqpout;
2337} 2337}
2338 2338
2339 2339
@@ -2369,7 +2369,7 @@ xfs_qm_dqalloc_incore(
2369 */ 2369 */
2370 memset(&dqp->q_core, 0, sizeof(dqp->q_core)); 2370 memset(&dqp->q_core, 0, sizeof(dqp->q_core));
2371 *O_dqpp = dqp; 2371 *O_dqpp = dqp;
2372 return (B_FALSE); 2372 return B_FALSE;
2373 } 2373 }
2374 XQM_STATS_INC(xqmstats.xs_qm_dqreclaim_misses); 2374 XQM_STATS_INC(xqmstats.xs_qm_dqreclaim_misses);
2375 } 2375 }
@@ -2382,7 +2382,7 @@ xfs_qm_dqalloc_incore(
2382 *O_dqpp = kmem_zone_zalloc(xfs_Gqm->qm_dqzone, KM_SLEEP); 2382 *O_dqpp = kmem_zone_zalloc(xfs_Gqm->qm_dqzone, KM_SLEEP);
2383 atomic_inc(&xfs_Gqm->qm_totaldquots); 2383 atomic_inc(&xfs_Gqm->qm_totaldquots);
2384 2384
2385 return (B_TRUE); 2385 return B_TRUE;
2386} 2386}
2387 2387
2388 2388
@@ -2407,13 +2407,13 @@ xfs_qm_write_sb_changes(
2407 0, 2407 0,
2408 XFS_DEFAULT_LOG_COUNT))) { 2408 XFS_DEFAULT_LOG_COUNT))) {
2409 xfs_trans_cancel(tp, 0); 2409 xfs_trans_cancel(tp, 0);
2410 return (error); 2410 return error;
2411 } 2411 }
2412 2412
2413 xfs_mod_sb(tp, flags); 2413 xfs_mod_sb(tp, flags);
2414 (void) xfs_trans_commit(tp, 0, NULL); 2414 (void) xfs_trans_commit(tp, 0, NULL);
2415 2415
2416 return (0); 2416 return 0;
2417} 2417}
2418 2418
2419 2419
@@ -2463,7 +2463,7 @@ xfs_qm_vop_dqalloc(
2463 if ((error = xfs_qm_dqattach(ip, XFS_QMOPT_DQALLOC | 2463 if ((error = xfs_qm_dqattach(ip, XFS_QMOPT_DQALLOC |
2464 XFS_QMOPT_ILOCKED))) { 2464 XFS_QMOPT_ILOCKED))) {
2465 xfs_iunlock(ip, lockflags); 2465 xfs_iunlock(ip, lockflags);
2466 return (error); 2466 return error;
2467 } 2467 }
2468 } 2468 }
2469 2469
@@ -2486,7 +2486,7 @@ xfs_qm_vop_dqalloc(
2486 XFS_QMOPT_DOWARN, 2486 XFS_QMOPT_DOWARN,
2487 &uq))) { 2487 &uq))) {
2488 ASSERT(error != ENOENT); 2488 ASSERT(error != ENOENT);
2489 return (error); 2489 return error;
2490 } 2490 }
2491 /* 2491 /*
2492 * Get the ilock in the right order. 2492 * Get the ilock in the right order.
@@ -2517,7 +2517,7 @@ xfs_qm_vop_dqalloc(
2517 if (uq) 2517 if (uq)
2518 xfs_qm_dqrele(uq); 2518 xfs_qm_dqrele(uq);
2519 ASSERT(error != ENOENT); 2519 ASSERT(error != ENOENT);
2520 return (error); 2520 return error;
2521 } 2521 }
2522 xfs_dqunlock(gq); 2522 xfs_dqunlock(gq);
2523 lockflags = XFS_ILOCK_SHARED; 2523 lockflags = XFS_ILOCK_SHARED;
@@ -2565,7 +2565,7 @@ xfs_qm_vop_dqalloc(
2565 *O_gdqpp = gq; 2565 *O_gdqpp = gq;
2566 else if (gq) 2566 else if (gq)
2567 xfs_qm_dqrele(gq); 2567 xfs_qm_dqrele(gq);
2568 return (0); 2568 return 0;
2569} 2569}
2570 2570
2571/* 2571/*
@@ -2608,7 +2608,7 @@ xfs_qm_vop_chown(
2608 xfs_dqunlock(newdq); 2608 xfs_dqunlock(newdq);
2609 *IO_olddq = newdq; 2609 *IO_olddq = newdq;
2610 2610
2611 return (prevdq); 2611 return prevdq;
2612} 2612}
2613 2613
2614/* 2614/*
@@ -2702,12 +2702,12 @@ xfs_qm_vop_rename_dqattach(
2702 ip = i_tab[0]; 2702 ip = i_tab[0];
2703 2703
2704 if (! XFS_IS_QUOTA_ON(ip->i_mount)) 2704 if (! XFS_IS_QUOTA_ON(ip->i_mount))
2705 return (0); 2705 return 0;
2706 2706
2707 if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) { 2707 if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) {
2708 error = xfs_qm_dqattach(ip, 0); 2708 error = xfs_qm_dqattach(ip, 0);
2709 if (error) 2709 if (error)
2710 return (error); 2710 return error;
2711 } 2711 }
2712 for (i = 1; (i < 4 && i_tab[i]); i++) { 2712 for (i = 1; (i < 4 && i_tab[i]); i++) {
2713 /* 2713 /*
@@ -2717,11 +2717,11 @@ xfs_qm_vop_rename_dqattach(
2717 if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) { 2717 if (XFS_NOT_DQATTACHED(ip->i_mount, ip)) {
2718 error = xfs_qm_dqattach(ip, 0); 2718 error = xfs_qm_dqattach(ip, 0);
2719 if (error) 2719 if (error)
2720 return (error); 2720 return error;
2721 } 2721 }
2722 } 2722 }
2723 } 2723 }
2724 return (0); 2724 return 0;
2725} 2725}
2726 2726
2727void 2727void
@@ -2834,7 +2834,7 @@ xfs_qm_dqhashlock_nowait(
2834 int locked; 2834 int locked;
2835 2835
2836 locked = mutex_trylock(&((dqp)->q_hash->qh_lock)); 2836 locked = mutex_trylock(&((dqp)->q_hash->qh_lock));
2837 return (locked); 2837 return locked;
2838} 2838}
2839 2839
2840int 2840int
@@ -2844,7 +2844,7 @@ xfs_qm_freelist_lock_nowait(
2844 int locked; 2844 int locked;
2845 2845
2846 locked = mutex_trylock(&(xqm->qm_dqfreelist.qh_lock)); 2846 locked = mutex_trylock(&(xqm->qm_dqfreelist.qh_lock));
2847 return (locked); 2847 return locked;
2848} 2848}
2849 2849
2850STATIC int 2850STATIC int
@@ -2855,5 +2855,5 @@ xfs_qm_mplist_nowait(
2855 2855
2856 ASSERT(mp->m_quotainfo); 2856 ASSERT(mp->m_quotainfo);
2857 locked = mutex_trylock(&(XFS_QI_MPLLOCK(mp))); 2857 locked = mutex_trylock(&(XFS_QI_MPLLOCK(mp)));
2858 return (locked); 2858 return locked;
2859} 2859}