aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dquot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dquot.c')
-rw-r--r--fs/xfs/xfs_dquot.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 3ee0cd43edc0..8a44a79f49af 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -327,7 +327,7 @@ xfs_qm_dqalloc(
327 */ 327 */
328 if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) { 328 if (!xfs_this_quota_on(dqp->q_mount, dqp->dq_flags)) {
329 xfs_iunlock(quotip, XFS_ILOCK_EXCL); 329 xfs_iunlock(quotip, XFS_ILOCK_EXCL);
330 return (ESRCH); 330 return -ESRCH;
331 } 331 }
332 332
333 xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL); 333 xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
@@ -354,7 +354,7 @@ xfs_qm_dqalloc(
354 mp->m_quotainfo->qi_dqchunklen, 354 mp->m_quotainfo->qi_dqchunklen,
355 0); 355 0);
356 if (!bp) { 356 if (!bp) {
357 error = ENOMEM; 357 error = -ENOMEM;
358 goto error1; 358 goto error1;
359 } 359 }
360 bp->b_ops = &xfs_dquot_buf_ops; 360 bp->b_ops = &xfs_dquot_buf_ops;
@@ -400,7 +400,7 @@ xfs_qm_dqalloc(
400 error0: 400 error0:
401 xfs_iunlock(quotip, XFS_ILOCK_EXCL); 401 xfs_iunlock(quotip, XFS_ILOCK_EXCL);
402 402
403 return (error); 403 return error;
404} 404}
405 405
406STATIC int 406STATIC int
@@ -426,7 +426,7 @@ xfs_qm_dqrepair(
426 426
427 if (error) { 427 if (error) {
428 ASSERT(*bpp == NULL); 428 ASSERT(*bpp == NULL);
429 return XFS_ERROR(error); 429 return error;
430 } 430 }
431 (*bpp)->b_ops = &xfs_dquot_buf_ops; 431 (*bpp)->b_ops = &xfs_dquot_buf_ops;
432 432
@@ -442,7 +442,7 @@ xfs_qm_dqrepair(
442 if (error) { 442 if (error) {
443 /* repair failed, we're screwed */ 443 /* repair failed, we're screwed */
444 xfs_trans_brelse(tp, *bpp); 444 xfs_trans_brelse(tp, *bpp);
445 return XFS_ERROR(EIO); 445 return -EIO;
446 } 446 }
447 } 447 }
448 448
@@ -480,7 +480,7 @@ xfs_qm_dqtobp(
480 * didn't have the quota inode lock. 480 * didn't have the quota inode lock.
481 */ 481 */
482 xfs_iunlock(quotip, lock_mode); 482 xfs_iunlock(quotip, lock_mode);
483 return ESRCH; 483 return -ESRCH;
484 } 484 }
485 485
486 /* 486 /*
@@ -508,7 +508,7 @@ xfs_qm_dqtobp(
508 * We don't allocate unless we're asked to 508 * We don't allocate unless we're asked to
509 */ 509 */
510 if (!(flags & XFS_QMOPT_DQALLOC)) 510 if (!(flags & XFS_QMOPT_DQALLOC))
511 return ENOENT; 511 return -ENOENT;
512 512
513 ASSERT(tp); 513 ASSERT(tp);
514 error = xfs_qm_dqalloc(tpp, mp, dqp, quotip, 514 error = xfs_qm_dqalloc(tpp, mp, dqp, quotip,
@@ -530,7 +530,7 @@ xfs_qm_dqtobp(
530 mp->m_quotainfo->qi_dqchunklen, 530 mp->m_quotainfo->qi_dqchunklen,
531 0, &bp, &xfs_dquot_buf_ops); 531 0, &bp, &xfs_dquot_buf_ops);
532 532
533 if (error == EFSCORRUPTED && (flags & XFS_QMOPT_DQREPAIR)) { 533 if (error == -EFSCORRUPTED && (flags & XFS_QMOPT_DQREPAIR)) {
534 xfs_dqid_t firstid = (xfs_dqid_t)map.br_startoff * 534 xfs_dqid_t firstid = (xfs_dqid_t)map.br_startoff *
535 mp->m_quotainfo->qi_dqperchunk; 535 mp->m_quotainfo->qi_dqperchunk;
536 ASSERT(bp == NULL); 536 ASSERT(bp == NULL);
@@ -539,7 +539,7 @@ xfs_qm_dqtobp(
539 539
540 if (error) { 540 if (error) {
541 ASSERT(bp == NULL); 541 ASSERT(bp == NULL);
542 return XFS_ERROR(error); 542 return error;
543 } 543 }
544 } 544 }
545 545
@@ -547,7 +547,7 @@ xfs_qm_dqtobp(
547 *O_bpp = bp; 547 *O_bpp = bp;
548 *O_ddpp = bp->b_addr + dqp->q_bufoffset; 548 *O_ddpp = bp->b_addr + dqp->q_bufoffset;
549 549
550 return (0); 550 return 0;
551} 551}
552 552
553 553
@@ -715,7 +715,7 @@ xfs_qm_dqget(
715 if ((! XFS_IS_UQUOTA_ON(mp) && type == XFS_DQ_USER) || 715 if ((! XFS_IS_UQUOTA_ON(mp) && type == XFS_DQ_USER) ||
716 (! XFS_IS_PQUOTA_ON(mp) && type == XFS_DQ_PROJ) || 716 (! XFS_IS_PQUOTA_ON(mp) && type == XFS_DQ_PROJ) ||
717 (! XFS_IS_GQUOTA_ON(mp) && type == XFS_DQ_GROUP)) { 717 (! XFS_IS_GQUOTA_ON(mp) && type == XFS_DQ_GROUP)) {
718 return (ESRCH); 718 return -ESRCH;
719 } 719 }
720 720
721#ifdef DEBUG 721#ifdef DEBUG
@@ -723,7 +723,7 @@ xfs_qm_dqget(
723 if ((xfs_dqerror_target == mp->m_ddev_targp) && 723 if ((xfs_dqerror_target == mp->m_ddev_targp) &&
724 (xfs_dqreq_num++ % xfs_dqerror_mod) == 0) { 724 (xfs_dqreq_num++ % xfs_dqerror_mod) == 0) {
725 xfs_debug(mp, "Returning error in dqget"); 725 xfs_debug(mp, "Returning error in dqget");
726 return (EIO); 726 return -EIO;
727 } 727 }
728 } 728 }
729 729
@@ -796,14 +796,14 @@ restart:
796 } else { 796 } else {
797 /* inode stays locked on return */ 797 /* inode stays locked on return */
798 xfs_qm_dqdestroy(dqp); 798 xfs_qm_dqdestroy(dqp);
799 return XFS_ERROR(ESRCH); 799 return -ESRCH;
800 } 800 }
801 } 801 }
802 802
803 mutex_lock(&qi->qi_tree_lock); 803 mutex_lock(&qi->qi_tree_lock);
804 error = -radix_tree_insert(tree, id, dqp); 804 error = radix_tree_insert(tree, id, dqp);
805 if (unlikely(error)) { 805 if (unlikely(error)) {
806 WARN_ON(error != EEXIST); 806 WARN_ON(error != -EEXIST);
807 807
808 /* 808 /*
809 * Duplicate found. Just throw away the new dquot and start 809 * Duplicate found. Just throw away the new dquot and start
@@ -829,7 +829,7 @@ restart:
829 ASSERT((ip == NULL) || xfs_isilocked(ip, XFS_ILOCK_EXCL)); 829 ASSERT((ip == NULL) || xfs_isilocked(ip, XFS_ILOCK_EXCL));
830 trace_xfs_dqget_miss(dqp); 830 trace_xfs_dqget_miss(dqp);
831 *O_dqpp = dqp; 831 *O_dqpp = dqp;
832 return (0); 832 return 0;
833} 833}
834 834
835/* 835/*
@@ -966,7 +966,7 @@ xfs_qm_dqflush(
966 SHUTDOWN_CORRUPT_INCORE); 966 SHUTDOWN_CORRUPT_INCORE);
967 else 967 else
968 spin_unlock(&mp->m_ail->xa_lock); 968 spin_unlock(&mp->m_ail->xa_lock);
969 error = XFS_ERROR(EIO); 969 error = -EIO;
970 goto out_unlock; 970 goto out_unlock;
971 } 971 }
972 972
@@ -992,7 +992,7 @@ xfs_qm_dqflush(
992 xfs_buf_relse(bp); 992 xfs_buf_relse(bp);
993 xfs_dqfunlock(dqp); 993 xfs_dqfunlock(dqp);
994 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); 994 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
995 return XFS_ERROR(EIO); 995 return -EIO;
996 } 996 }
997 997
998 /* This is the only portion of data that needs to persist */ 998 /* This is the only portion of data that needs to persist */
@@ -1045,7 +1045,7 @@ xfs_qm_dqflush(
1045 1045
1046out_unlock: 1046out_unlock:
1047 xfs_dqfunlock(dqp); 1047 xfs_dqfunlock(dqp);
1048 return XFS_ERROR(EIO); 1048 return -EIO;
1049} 1049}
1050 1050
1051/* 1051/*