Lines Matching refs:error
67 int error = 0; in xfs_qm_dquot_walk() local
83 error = execute(batch[i], data); in xfs_qm_dquot_walk()
84 if (error == -EAGAIN) { in xfs_qm_dquot_walk()
88 if (error && last_error != -EFSCORRUPTED) in xfs_qm_dquot_walk()
89 last_error = error; in xfs_qm_dquot_walk()
141 int error; in xfs_qm_dqpurge() local
147 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dqpurge()
148 if (!error) { in xfs_qm_dqpurge()
149 error = xfs_bwrite(bp); in xfs_qm_dqpurge()
253 int error; in xfs_qm_dqattach_one() local
256 error = 0; in xfs_qm_dqattach_one()
275 error = xfs_qm_dqget_inode(ip, type, doalloc, &dqp); in xfs_qm_dqattach_one()
276 if (error) in xfs_qm_dqattach_one()
277 return error; in xfs_qm_dqattach_one()
320 int error = 0; in xfs_qm_dqattach_locked() local
328 error = xfs_qm_dqattach_one(ip, ip->i_d.di_uid, XFS_DQ_USER, in xfs_qm_dqattach_locked()
330 if (error) in xfs_qm_dqattach_locked()
336 error = xfs_qm_dqattach_one(ip, ip->i_d.di_gid, XFS_DQ_GROUP, in xfs_qm_dqattach_locked()
338 if (error) in xfs_qm_dqattach_locked()
344 error = xfs_qm_dqattach_one(ip, xfs_get_projid(ip), XFS_DQ_PROJ, in xfs_qm_dqattach_locked()
346 if (error) in xfs_qm_dqattach_locked()
357 return error; in xfs_qm_dqattach_locked()
364 int error; in xfs_qm_dqattach() local
370 error = xfs_qm_dqattach_locked(ip, false); in xfs_qm_dqattach()
373 return error; in xfs_qm_dqattach()
451 int error; in xfs_qm_dquot_isolate() local
458 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dquot_isolate()
459 if (error) in xfs_qm_dquot_isolate()
503 int error; in xfs_qm_shrink_scan() local
514 error = xfs_buf_delwri_submit(&isol.buffers); in xfs_qm_shrink_scan()
515 if (error) in xfs_qm_shrink_scan()
549 int error; in xfs_qm_set_defquota() local
551 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_set_defquota()
552 if (error) in xfs_qm_set_defquota()
580 int error; in xfs_qm_init_timelimits() local
606 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_init_timelimits()
607 if (error) in xfs_qm_init_timelimits()
641 int error; in xfs_qm_init_quotainfo() local
647 error = list_lru_init(&qinf->qi_lru); in xfs_qm_init_quotainfo()
648 if (error) in xfs_qm_init_quotainfo()
655 error = xfs_qm_init_quotainos(mp); in xfs_qm_init_quotainfo()
656 if (error) in xfs_qm_init_quotainfo()
687 error = register_shrinker(&qinf->qi_shrinker); in xfs_qm_init_quotainfo()
688 if (error) in xfs_qm_init_quotainfo()
702 return error; in xfs_qm_init_quotainfo()
739 int error; in xfs_qm_qino_alloc() local
764 error = xfs_iget(mp, NULL, ino, 0, 0, ip); in xfs_qm_qino_alloc()
765 if (error) in xfs_qm_qino_alloc()
766 return error; in xfs_qm_qino_alloc()
773 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_create, in xfs_qm_qino_alloc()
775 if (error) in xfs_qm_qino_alloc()
776 return error; in xfs_qm_qino_alloc()
779 error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, 0, ip); in xfs_qm_qino_alloc()
780 if (error) { in xfs_qm_qino_alloc()
782 return error; in xfs_qm_qino_alloc()
812 error = xfs_trans_commit(tp); in xfs_qm_qino_alloc()
813 if (error) { in xfs_qm_qino_alloc()
815 xfs_alert(mp, "%s failed (error %d)!", __func__, error); in xfs_qm_qino_alloc()
819 return error; in xfs_qm_qino_alloc()
894 int error; in xfs_qm_reset_dqcounts_all() local
900 error = 0; in xfs_qm_reset_dqcounts_all()
912 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
924 if (error == -EFSCORRUPTED) { in xfs_qm_reset_dqcounts_all()
925 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
931 if (error) in xfs_qm_reset_dqcounts_all()
949 return error; in xfs_qm_reset_dqcounts_all()
965 int error; /* return value */ in xfs_qm_reset_dqcounts_buf() local
972 error = 0; in xfs_qm_reset_dqcounts_buf()
995 error = xfs_bmapi_read(qip, lblkno, maxlblkcnt - lblkno, in xfs_qm_reset_dqcounts_buf()
998 if (error) in xfs_qm_reset_dqcounts_buf()
1033 error = xfs_qm_reset_dqcounts_all(mp, firstid, in xfs_qm_reset_dqcounts_buf()
1037 if (error) in xfs_qm_reset_dqcounts_buf()
1044 return error; in xfs_qm_reset_dqcounts_buf()
1065 int error; in xfs_qm_quotacheck_dqadjust() local
1068 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_quotacheck_dqadjust()
1069 if (error) { in xfs_qm_quotacheck_dqadjust()
1073 ASSERT(error != -ESRCH); in xfs_qm_quotacheck_dqadjust()
1074 ASSERT(error != -ENOENT); in xfs_qm_quotacheck_dqadjust()
1075 return error; in xfs_qm_quotacheck_dqadjust()
1125 int error; in xfs_qm_dqusage_adjust() local
1140 error = xfs_iget(mp, tp, ino, XFS_IGET_DONTCACHE, 0, &ip); in xfs_qm_dqusage_adjust()
1141 if (error == -EINVAL || error == -ENOENT) in xfs_qm_dqusage_adjust()
1143 if (error) in xfs_qm_dqusage_adjust()
1144 return error; in xfs_qm_dqusage_adjust()
1152 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_qm_dqusage_adjust()
1153 if (error) in xfs_qm_dqusage_adjust()
1175 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQ_USER, nblks, in xfs_qm_dqusage_adjust()
1177 if (error) in xfs_qm_dqusage_adjust()
1182 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQ_GROUP, nblks, in xfs_qm_dqusage_adjust()
1184 if (error) in xfs_qm_dqusage_adjust()
1189 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQ_PROJ, nblks, in xfs_qm_dqusage_adjust()
1191 if (error) in xfs_qm_dqusage_adjust()
1197 return error; in xfs_qm_dqusage_adjust()
1208 int error = 0; in xfs_qm_flush_one() local
1229 error = -EINVAL; in xfs_qm_flush_one()
1237 error = -EAGAIN; in xfs_qm_flush_one()
1241 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_flush_one()
1242 if (error) in xfs_qm_flush_one()
1249 return error; in xfs_qm_flush_one()
1260 int error, error2; in xfs_qm_quotacheck() local
1280 error = xfs_qm_reset_dqcounts_buf(mp, uip, XFS_QMOPT_UQUOTA, in xfs_qm_quotacheck()
1282 if (error) in xfs_qm_quotacheck()
1288 error = xfs_qm_reset_dqcounts_buf(mp, gip, XFS_QMOPT_GQUOTA, in xfs_qm_quotacheck()
1290 if (error) in xfs_qm_quotacheck()
1296 error = xfs_qm_reset_dqcounts_buf(mp, pip, XFS_QMOPT_PQUOTA, in xfs_qm_quotacheck()
1298 if (error) in xfs_qm_quotacheck()
1303 error = xfs_iwalk_threaded(mp, 0, 0, xfs_qm_dqusage_adjust, 0, true, in xfs_qm_quotacheck()
1305 if (error) in xfs_qm_quotacheck()
1313 error = xfs_qm_dquot_walk(mp, XFS_DQ_USER, xfs_qm_flush_one, in xfs_qm_quotacheck()
1319 if (!error) in xfs_qm_quotacheck()
1320 error = error2; in xfs_qm_quotacheck()
1325 if (!error) in xfs_qm_quotacheck()
1326 error = error2; in xfs_qm_quotacheck()
1330 if (!error) in xfs_qm_quotacheck()
1331 error = error2; in xfs_qm_quotacheck()
1340 if (error) { in xfs_qm_quotacheck()
1356 if (error) { in xfs_qm_quotacheck()
1359 error); in xfs_qm_quotacheck()
1371 return error; in xfs_qm_quotacheck()
1387 int error = 0; in xfs_qm_mount_quotas() local
1406 error = xfs_qm_init_quotainfo(mp); in xfs_qm_mount_quotas()
1407 if (error) { in xfs_qm_mount_quotas()
1419 error = xfs_qm_quotacheck(mp); in xfs_qm_mount_quotas()
1420 if (error) { in xfs_qm_mount_quotas()
1461 if (error) { in xfs_qm_mount_quotas()
1478 int error; in xfs_qm_init_quotainos() local
1490 error = xfs_iget(mp, NULL, mp->m_sb.sb_uquotino, in xfs_qm_init_quotainos()
1492 if (error) in xfs_qm_init_quotainos()
1493 return error; in xfs_qm_init_quotainos()
1498 error = xfs_iget(mp, NULL, mp->m_sb.sb_gquotino, in xfs_qm_init_quotainos()
1500 if (error) in xfs_qm_init_quotainos()
1506 error = xfs_iget(mp, NULL, mp->m_sb.sb_pquotino, in xfs_qm_init_quotainos()
1508 if (error) in xfs_qm_init_quotainos()
1522 error = xfs_qm_qino_alloc(mp, &uip, in xfs_qm_init_quotainos()
1524 if (error) in xfs_qm_init_quotainos()
1530 error = xfs_qm_qino_alloc(mp, &gip, in xfs_qm_init_quotainos()
1532 if (error) in xfs_qm_init_quotainos()
1538 error = xfs_qm_qino_alloc(mp, &pip, in xfs_qm_init_quotainos()
1540 if (error) in xfs_qm_init_quotainos()
1557 return error; in xfs_qm_init_quotainos()
1623 int error; in xfs_qm_vop_dqalloc() local
1640 error = xfs_qm_dqattach_locked(ip, true); in xfs_qm_vop_dqalloc()
1641 if (error) { in xfs_qm_vop_dqalloc()
1643 return error; in xfs_qm_vop_dqalloc()
1659 error = xfs_qm_dqget(mp, uid, XFS_DQ_USER, true, &uq); in xfs_qm_vop_dqalloc()
1660 if (error) { in xfs_qm_vop_dqalloc()
1661 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1662 return error; in xfs_qm_vop_dqalloc()
1682 error = xfs_qm_dqget(mp, gid, XFS_DQ_GROUP, true, &gq); in xfs_qm_vop_dqalloc()
1683 if (error) { in xfs_qm_vop_dqalloc()
1684 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1698 error = xfs_qm_dqget(mp, (xfs_dqid_t)prid, XFS_DQ_PROJ, in xfs_qm_vop_dqalloc()
1700 if (error) { in xfs_qm_vop_dqalloc()
1701 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1733 return error; in xfs_qm_vop_dqalloc()
1797 int error; in xfs_qm_vop_chown_reserve() local
1839 error = xfs_trans_reserve_quota_bydquots(tp, ip->i_mount, in xfs_qm_vop_chown_reserve()
1843 if (error) in xfs_qm_vop_chown_reserve()
1844 return error; in xfs_qm_vop_chown_reserve()
1858 error = xfs_trans_reserve_quota_bydquots(NULL, ip->i_mount, in xfs_qm_vop_chown_reserve()
1862 if (error) in xfs_qm_vop_chown_reserve()
1863 return error; in xfs_qm_vop_chown_reserve()
1884 int error; in xfs_qm_vop_rename_dqattach() local
1891 error = xfs_qm_dqattach(ip); in xfs_qm_vop_rename_dqattach()
1892 if (error) in xfs_qm_vop_rename_dqattach()
1893 return error; in xfs_qm_vop_rename_dqattach()