Lines Matching refs:error
68 int error = 0; in xfs_qm_dquot_walk() local
84 error = execute(batch[i], data); in xfs_qm_dquot_walk()
85 if (error == -EAGAIN) { in xfs_qm_dquot_walk()
89 if (error && last_error != -EFSCORRUPTED) in xfs_qm_dquot_walk()
90 last_error = error; in xfs_qm_dquot_walk()
124 int error = -EAGAIN; in xfs_qm_dqpurge() local
146 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dqpurge()
147 if (!error) { in xfs_qm_dqpurge()
148 error = xfs_bwrite(bp); in xfs_qm_dqpurge()
150 } else if (error == -EAGAIN) { in xfs_qm_dqpurge()
180 return error; in xfs_qm_dqpurge()
257 int error; in xfs_qm_dqattach_one() local
260 error = 0; in xfs_qm_dqattach_one()
279 error = xfs_qm_dqget_inode(ip, type, doalloc, &dqp); in xfs_qm_dqattach_one()
280 if (error) in xfs_qm_dqattach_one()
281 return error; in xfs_qm_dqattach_one()
324 int error = 0; in xfs_qm_dqattach_locked() local
332 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_USER, in xfs_qm_dqattach_locked()
334 if (error) in xfs_qm_dqattach_locked()
340 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_GROUP, in xfs_qm_dqattach_locked()
342 if (error) in xfs_qm_dqattach_locked()
348 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_PROJ, in xfs_qm_dqattach_locked()
350 if (error) in xfs_qm_dqattach_locked()
361 return error; in xfs_qm_dqattach_locked()
368 int error; in xfs_qm_dqattach() local
374 error = xfs_qm_dqattach_locked(ip, false); in xfs_qm_dqattach()
377 return error; in xfs_qm_dqattach()
455 int error; in xfs_qm_dquot_isolate() local
462 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dquot_isolate()
463 if (error) in xfs_qm_dquot_isolate()
507 int error; in xfs_qm_shrink_scan() local
518 error = xfs_buf_delwri_submit(&isol.buffers); in xfs_qm_shrink_scan()
519 if (error) in xfs_qm_shrink_scan()
552 int error; in xfs_qm_set_defquota() local
554 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_set_defquota()
555 if (error) in xfs_qm_set_defquota()
582 int error; in xfs_qm_init_timelimits() local
600 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_init_timelimits()
601 if (error) in xfs_qm_init_timelimits()
634 int error; in xfs_qm_init_quotainfo() local
640 error = list_lru_init(&qinf->qi_lru); in xfs_qm_init_quotainfo()
641 if (error) in xfs_qm_init_quotainfo()
648 error = xfs_qm_init_quotainos(mp); in xfs_qm_init_quotainfo()
649 if (error) in xfs_qm_init_quotainfo()
693 error = register_shrinker(&qinf->qi_shrinker); in xfs_qm_init_quotainfo()
694 if (error) in xfs_qm_init_quotainfo()
708 return error; in xfs_qm_init_quotainfo()
745 int error; in xfs_qm_qino_alloc() local
774 error = xfs_iget(mp, NULL, ino, 0, 0, ip); in xfs_qm_qino_alloc()
775 if (error) in xfs_qm_qino_alloc()
776 return error; in xfs_qm_qino_alloc()
783 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_create, in xfs_qm_qino_alloc()
786 if (error) in xfs_qm_qino_alloc()
787 return error; in xfs_qm_qino_alloc()
790 error = xfs_dir_ialloc(&tp, NULL, S_IFREG, 1, 0, 0, ip); in xfs_qm_qino_alloc()
791 if (error) { in xfs_qm_qino_alloc()
793 return error; in xfs_qm_qino_alloc()
823 error = xfs_trans_commit(tp); in xfs_qm_qino_alloc()
824 if (error) { in xfs_qm_qino_alloc()
826 xfs_alert(mp, "%s failed (error %d)!", __func__, error); in xfs_qm_qino_alloc()
830 return error; in xfs_qm_qino_alloc()
914 int error = 0; in xfs_qm_reset_dqcounts_all() local
928 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
940 if (error == -EFSCORRUPTED) { in xfs_qm_reset_dqcounts_all()
941 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
947 if (error) in xfs_qm_reset_dqcounts_all()
965 return error; in xfs_qm_reset_dqcounts_all()
981 int error; /* return value */ in xfs_qm_reset_dqcounts_buf() local
988 error = 0; in xfs_qm_reset_dqcounts_buf()
1011 error = xfs_bmapi_read(qip, lblkno, maxlblkcnt - lblkno, in xfs_qm_reset_dqcounts_buf()
1014 if (error) in xfs_qm_reset_dqcounts_buf()
1049 error = xfs_qm_reset_dqcounts_all(mp, firstid, in xfs_qm_reset_dqcounts_buf()
1053 if (error) in xfs_qm_reset_dqcounts_buf()
1060 return error; in xfs_qm_reset_dqcounts_buf()
1081 int error; in xfs_qm_quotacheck_dqadjust() local
1084 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_quotacheck_dqadjust()
1085 if (error) { in xfs_qm_quotacheck_dqadjust()
1089 ASSERT(error != -ESRCH); in xfs_qm_quotacheck_dqadjust()
1090 ASSERT(error != -ENOENT); in xfs_qm_quotacheck_dqadjust()
1091 return error; in xfs_qm_quotacheck_dqadjust()
1141 int error; in xfs_qm_dqusage_adjust() local
1156 error = xfs_iget(mp, tp, ino, XFS_IGET_DONTCACHE, 0, &ip); in xfs_qm_dqusage_adjust()
1157 if (error == -EINVAL || error == -ENOENT) in xfs_qm_dqusage_adjust()
1159 if (error) in xfs_qm_dqusage_adjust()
1160 return error; in xfs_qm_dqusage_adjust()
1168 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_qm_dqusage_adjust()
1169 if (error) in xfs_qm_dqusage_adjust()
1191 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_USER, nblks, in xfs_qm_dqusage_adjust()
1193 if (error) in xfs_qm_dqusage_adjust()
1198 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_GROUP, nblks, in xfs_qm_dqusage_adjust()
1200 if (error) in xfs_qm_dqusage_adjust()
1205 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_PROJ, nblks, in xfs_qm_dqusage_adjust()
1207 if (error) in xfs_qm_dqusage_adjust()
1213 return error; in xfs_qm_dqusage_adjust()
1224 int error = 0; in xfs_qm_flush_one() local
1245 error = -EINVAL; in xfs_qm_flush_one()
1253 error = -EAGAIN; in xfs_qm_flush_one()
1257 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_flush_one()
1258 if (error) in xfs_qm_flush_one()
1265 return error; in xfs_qm_flush_one()
1276 int error, error2; in xfs_qm_quotacheck() local
1296 error = xfs_qm_reset_dqcounts_buf(mp, uip, XFS_DQTYPE_USER, in xfs_qm_quotacheck()
1298 if (error) in xfs_qm_quotacheck()
1304 error = xfs_qm_reset_dqcounts_buf(mp, gip, XFS_DQTYPE_GROUP, in xfs_qm_quotacheck()
1306 if (error) in xfs_qm_quotacheck()
1312 error = xfs_qm_reset_dqcounts_buf(mp, pip, XFS_DQTYPE_PROJ, in xfs_qm_quotacheck()
1314 if (error) in xfs_qm_quotacheck()
1319 error = xfs_iwalk_threaded(mp, 0, 0, xfs_qm_dqusage_adjust, 0, true, in xfs_qm_quotacheck()
1321 if (error) { in xfs_qm_quotacheck()
1336 error = xfs_qm_dquot_walk(mp, XFS_DQTYPE_USER, xfs_qm_flush_one, in xfs_qm_quotacheck()
1342 if (!error) in xfs_qm_quotacheck()
1343 error = error2; in xfs_qm_quotacheck()
1348 if (!error) in xfs_qm_quotacheck()
1349 error = error2; in xfs_qm_quotacheck()
1353 if (!error) in xfs_qm_quotacheck()
1354 error = error2; in xfs_qm_quotacheck()
1363 if (error) { in xfs_qm_quotacheck()
1379 if (error) { in xfs_qm_quotacheck()
1382 error); in xfs_qm_quotacheck()
1394 return error; in xfs_qm_quotacheck()
1410 int error = 0; in xfs_qm_mount_quotas() local
1429 error = xfs_qm_init_quotainfo(mp); in xfs_qm_mount_quotas()
1430 if (error) { in xfs_qm_mount_quotas()
1442 error = xfs_qm_quotacheck(mp); in xfs_qm_mount_quotas()
1443 if (error) { in xfs_qm_mount_quotas()
1484 if (error) { in xfs_qm_mount_quotas()
1501 int error; in xfs_qm_init_quotainos() local
1513 error = xfs_iget(mp, NULL, mp->m_sb.sb_uquotino, in xfs_qm_init_quotainos()
1515 if (error) in xfs_qm_init_quotainos()
1516 return error; in xfs_qm_init_quotainos()
1521 error = xfs_iget(mp, NULL, mp->m_sb.sb_gquotino, in xfs_qm_init_quotainos()
1523 if (error) in xfs_qm_init_quotainos()
1529 error = xfs_iget(mp, NULL, mp->m_sb.sb_pquotino, in xfs_qm_init_quotainos()
1531 if (error) in xfs_qm_init_quotainos()
1545 error = xfs_qm_qino_alloc(mp, &uip, in xfs_qm_init_quotainos()
1547 if (error) in xfs_qm_init_quotainos()
1553 error = xfs_qm_qino_alloc(mp, &gip, in xfs_qm_init_quotainos()
1555 if (error) in xfs_qm_init_quotainos()
1561 error = xfs_qm_qino_alloc(mp, &pip, in xfs_qm_init_quotainos()
1563 if (error) in xfs_qm_init_quotainos()
1580 return error; in xfs_qm_init_quotainos()
1647 int error; in xfs_qm_vop_dqalloc() local
1664 error = xfs_qm_dqattach_locked(ip, true); in xfs_qm_vop_dqalloc()
1665 if (error) { in xfs_qm_vop_dqalloc()
1667 return error; in xfs_qm_vop_dqalloc()
1684 error = xfs_qm_dqget(mp, from_kuid(user_ns, uid), in xfs_qm_vop_dqalloc()
1686 if (error) { in xfs_qm_vop_dqalloc()
1687 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1688 return error; in xfs_qm_vop_dqalloc()
1709 error = xfs_qm_dqget(mp, from_kgid(user_ns, gid), in xfs_qm_vop_dqalloc()
1711 if (error) { in xfs_qm_vop_dqalloc()
1712 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1727 error = xfs_qm_dqget(mp, prid, in xfs_qm_vop_dqalloc()
1729 if (error) { in xfs_qm_vop_dqalloc()
1730 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1761 return error; in xfs_qm_vop_dqalloc()
1887 int error; in xfs_qm_vop_rename_dqattach() local
1894 error = xfs_qm_dqattach(ip); in xfs_qm_vop_rename_dqattach()
1895 if (error) in xfs_qm_vop_rename_dqattach()
1896 return error; in xfs_qm_vop_rename_dqattach()