diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:10:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:10:34 -0500 |
commit | 9f5974c8734d83d4ab7096ed98136a82f41210d6 (patch) | |
tree | 6f328555796bafefb74936ab68128aa84efd28b1 /fs/xfs/quota | |
parent | a2d823bf13efea4c859376f6e85c49cfbad7ab60 (diff) | |
parent | ddae9c2ea79449beb00027cf77fca6dc489f2d15 (diff) |
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r-- | fs/xfs/quota/xfs_dquot_item.c | 4 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm.c | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index 2f69822344e5..2ec6b441849c 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c | |||
@@ -239,7 +239,7 @@ xfs_qm_dquot_logitem_pushbuf( | |||
239 | * trying to duplicate our effort. | 239 | * trying to duplicate our effort. |
240 | */ | 240 | */ |
241 | ASSERT(qip->qli_pushbuf_flag != 0); | 241 | ASSERT(qip->qli_pushbuf_flag != 0); |
242 | ASSERT(qip->qli_push_owner == get_thread_id()); | 242 | ASSERT(qip->qli_push_owner == current_pid()); |
243 | 243 | ||
244 | /* | 244 | /* |
245 | * If flushlock isn't locked anymore, chances are that the | 245 | * If flushlock isn't locked anymore, chances are that the |
@@ -333,7 +333,7 @@ xfs_qm_dquot_logitem_trylock( | |||
333 | qip->qli_pushbuf_flag = 1; | 333 | qip->qli_pushbuf_flag = 1; |
334 | ASSERT(qip->qli_format.qlf_blkno == dqp->q_blkno); | 334 | ASSERT(qip->qli_format.qlf_blkno == dqp->q_blkno); |
335 | #ifdef DEBUG | 335 | #ifdef DEBUG |
336 | qip->qli_push_owner = get_thread_id(); | 336 | qip->qli_push_owner = current_pid(); |
337 | #endif | 337 | #endif |
338 | /* | 338 | /* |
339 | * The dquot is left locked. | 339 | * The dquot is left locked. |
diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index bb6991a7a617..7dcdd0640c32 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c | |||
@@ -1392,11 +1392,12 @@ xfs_qm_qino_alloc( | |||
1392 | { | 1392 | { |
1393 | xfs_trans_t *tp; | 1393 | xfs_trans_t *tp; |
1394 | int error; | 1394 | int error; |
1395 | unsigned long s; | 1395 | unsigned long s; |
1396 | cred_t zerocr; | 1396 | cred_t zerocr; |
1397 | xfs_inode_t zeroino; | ||
1397 | int committed; | 1398 | int committed; |
1398 | 1399 | ||
1399 | tp = xfs_trans_alloc(mp,XFS_TRANS_QM_QINOCREATE); | 1400 | tp = xfs_trans_alloc(mp, XFS_TRANS_QM_QINOCREATE); |
1400 | if ((error = xfs_trans_reserve(tp, | 1401 | if ((error = xfs_trans_reserve(tp, |
1401 | XFS_QM_QINOCREATE_SPACE_RES(mp), | 1402 | XFS_QM_QINOCREATE_SPACE_RES(mp), |
1402 | XFS_CREATE_LOG_RES(mp), 0, | 1403 | XFS_CREATE_LOG_RES(mp), 0, |
@@ -1406,8 +1407,9 @@ xfs_qm_qino_alloc( | |||
1406 | return (error); | 1407 | return (error); |
1407 | } | 1408 | } |
1408 | memset(&zerocr, 0, sizeof(zerocr)); | 1409 | memset(&zerocr, 0, sizeof(zerocr)); |
1410 | memset(&zeroino, 0, sizeof(zeroino)); | ||
1409 | 1411 | ||
1410 | if ((error = xfs_dir_ialloc(&tp, mp->m_rootip, S_IFREG, 1, 0, | 1412 | if ((error = xfs_dir_ialloc(&tp, &zeroino, S_IFREG, 1, 0, |
1411 | &zerocr, 0, 1, ip, &committed))) { | 1413 | &zerocr, 0, 1, ip, &committed))) { |
1412 | xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | | 1414 | xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | |
1413 | XFS_TRANS_ABORT); | 1415 | XFS_TRANS_ABORT); |
@@ -1918,9 +1920,7 @@ xfs_qm_quotacheck( | |||
1918 | * at this point (because we intentionally didn't in dqget_noattach). | 1920 | * at this point (because we intentionally didn't in dqget_noattach). |
1919 | */ | 1921 | */ |
1920 | if (error) { | 1922 | if (error) { |
1921 | xfs_qm_dqpurge_all(mp, | 1923 | xfs_qm_dqpurge_all(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_QUOTAOFF); |
1922 | XFS_QMOPT_UQUOTA|XFS_QMOPT_GQUOTA| | ||
1923 | XFS_QMOPT_PQUOTA|XFS_QMOPT_QUOTAOFF); | ||
1924 | goto error_return; | 1924 | goto error_return; |
1925 | } | 1925 | } |
1926 | /* | 1926 | /* |
@@ -2743,6 +2743,7 @@ xfs_qm_vop_dqattach_and_dqmod_newinode( | |||
2743 | xfs_dqunlock(udqp); | 2743 | xfs_dqunlock(udqp); |
2744 | ASSERT(ip->i_udquot == NULL); | 2744 | ASSERT(ip->i_udquot == NULL); |
2745 | ip->i_udquot = udqp; | 2745 | ip->i_udquot = udqp; |
2746 | ASSERT(XFS_IS_UQUOTA_ON(tp->t_mountp)); | ||
2746 | ASSERT(ip->i_d.di_uid == be32_to_cpu(udqp->q_core.d_id)); | 2747 | ASSERT(ip->i_d.di_uid == be32_to_cpu(udqp->q_core.d_id)); |
2747 | xfs_trans_mod_dquot(tp, udqp, XFS_TRANS_DQ_ICOUNT, 1); | 2748 | xfs_trans_mod_dquot(tp, udqp, XFS_TRANS_DQ_ICOUNT, 1); |
2748 | } | 2749 | } |
@@ -2752,7 +2753,10 @@ xfs_qm_vop_dqattach_and_dqmod_newinode( | |||
2752 | xfs_dqunlock(gdqp); | 2753 | xfs_dqunlock(gdqp); |
2753 | ASSERT(ip->i_gdquot == NULL); | 2754 | ASSERT(ip->i_gdquot == NULL); |
2754 | ip->i_gdquot = gdqp; | 2755 | ip->i_gdquot = gdqp; |
2755 | ASSERT(ip->i_d.di_gid == be32_to_cpu(gdqp->q_core.d_id)); | 2756 | ASSERT(XFS_IS_OQUOTA_ON(tp->t_mountp)); |
2757 | ASSERT((XFS_IS_GQUOTA_ON(tp->t_mountp) ? | ||
2758 | ip->i_d.di_gid : ip->i_d.di_projid) == | ||
2759 | be32_to_cpu(gdqp->q_core.d_id)); | ||
2756 | xfs_trans_mod_dquot(tp, gdqp, XFS_TRANS_DQ_ICOUNT, 1); | 2760 | xfs_trans_mod_dquot(tp, gdqp, XFS_TRANS_DQ_ICOUNT, 1); |
2757 | } | 2761 | } |
2758 | } | 2762 | } |