Lines Matching refs:error
71 int error; in xfs_qm_dquot_walk() local
87 error = execute(batch[i], data); in xfs_qm_dquot_walk()
88 if (error == -EAGAIN) { in xfs_qm_dquot_walk()
92 if (error && last_error != -EFSCORRUPTED) in xfs_qm_dquot_walk()
93 last_error = error; in xfs_qm_dquot_walk()
126 int error = -EAGAIN; in xfs_qm_dqpurge() local
148 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dqpurge()
149 if (!error) { in xfs_qm_dqpurge()
150 error = xfs_bwrite(bp); in xfs_qm_dqpurge()
152 } else if (error == -EAGAIN) { in xfs_qm_dqpurge()
182 return error; in xfs_qm_dqpurge()
255 int error; in xfs_qm_dqattach_one() local
258 error = 0; in xfs_qm_dqattach_one()
277 error = xfs_qm_dqget_inode(ip, type, doalloc, &dqp); in xfs_qm_dqattach_one()
278 if (error) in xfs_qm_dqattach_one()
279 return error; in xfs_qm_dqattach_one()
320 int error = 0; in xfs_qm_dqattach_locked() local
328 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_USER, in xfs_qm_dqattach_locked()
330 if (error) in xfs_qm_dqattach_locked()
336 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_GROUP, in xfs_qm_dqattach_locked()
338 if (error) in xfs_qm_dqattach_locked()
344 error = xfs_qm_dqattach_one(ip, XFS_DQTYPE_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()
457 int error; in xfs_qm_dquot_isolate() local
464 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_dquot_isolate()
465 if (error) in xfs_qm_dquot_isolate()
511 int error; in xfs_qm_shrink_scan() local
522 error = xfs_buf_delwri_submit(&isol.buffers); in xfs_qm_shrink_scan()
523 if (error) in xfs_qm_shrink_scan()
556 int error; in xfs_qm_set_defquota() local
558 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_set_defquota()
559 if (error) in xfs_qm_set_defquota()
586 int error; in xfs_qm_init_timelimits() local
601 error = xfs_qm_dqget_uncached(mp, 0, type, &dqp); in xfs_qm_init_timelimits()
602 if (error) in xfs_qm_init_timelimits()
629 int error; in xfs_qm_init_quotainfo() local
635 error = list_lru_init(&qinf->qi_lru); in xfs_qm_init_quotainfo()
636 if (error) in xfs_qm_init_quotainfo()
643 error = xfs_qm_init_quotainos(mp); in xfs_qm_init_quotainfo()
644 if (error) in xfs_qm_init_quotainfo()
688 error = register_shrinker(&qinf->qi_shrinker, "xfs-qm:%s", in xfs_qm_init_quotainfo()
690 if (error) in xfs_qm_init_quotainfo()
704 return error; in xfs_qm_init_quotainfo()
741 int error; in xfs_qm_qino_alloc() local
770 error = xfs_iget(mp, NULL, ino, 0, 0, ipp); in xfs_qm_qino_alloc()
771 if (error) in xfs_qm_qino_alloc()
772 return error; in xfs_qm_qino_alloc()
779 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_create, in xfs_qm_qino_alloc()
782 if (error) in xfs_qm_qino_alloc()
783 return error; in xfs_qm_qino_alloc()
788 error = xfs_dialloc(&tp, 0, S_IFREG, &ino); in xfs_qm_qino_alloc()
789 if (!error) in xfs_qm_qino_alloc()
790 error = xfs_init_new_inode(&nop_mnt_idmap, tp, NULL, ino, in xfs_qm_qino_alloc()
792 if (error) { in xfs_qm_qino_alloc()
794 return error; in xfs_qm_qino_alloc()
824 error = xfs_trans_commit(tp); in xfs_qm_qino_alloc()
825 if (error) { in xfs_qm_qino_alloc()
827 xfs_alert(mp, "%s failed (error %d)!", __func__, error); in xfs_qm_qino_alloc()
831 return error; in xfs_qm_qino_alloc()
915 int error = 0; in xfs_qm_reset_dqcounts_all() local
929 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
941 if (error == -EFSCORRUPTED) { in xfs_qm_reset_dqcounts_all()
942 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, in xfs_qm_reset_dqcounts_all()
948 if (error) in xfs_qm_reset_dqcounts_all()
966 return error; in xfs_qm_reset_dqcounts_all()
982 int error; /* return value */ in xfs_qm_reset_dqcounts_buf() local
989 error = 0; in xfs_qm_reset_dqcounts_buf()
1012 error = xfs_bmapi_read(qip, lblkno, maxlblkcnt - lblkno, in xfs_qm_reset_dqcounts_buf()
1015 if (error) in xfs_qm_reset_dqcounts_buf()
1050 error = xfs_qm_reset_dqcounts_all(mp, firstid, in xfs_qm_reset_dqcounts_buf()
1054 if (error) in xfs_qm_reset_dqcounts_buf()
1061 return error; in xfs_qm_reset_dqcounts_buf()
1082 int error; in xfs_qm_quotacheck_dqadjust() local
1085 error = xfs_qm_dqget(mp, id, type, true, &dqp); in xfs_qm_quotacheck_dqadjust()
1086 if (error) { in xfs_qm_quotacheck_dqadjust()
1090 ASSERT(error != -ESRCH); in xfs_qm_quotacheck_dqadjust()
1091 ASSERT(error != -ENOENT); in xfs_qm_quotacheck_dqadjust()
1092 return error; in xfs_qm_quotacheck_dqadjust()
1142 int error; in xfs_qm_dqusage_adjust() local
1157 error = xfs_iget(mp, tp, ino, XFS_IGET_DONTCACHE, 0, &ip); in xfs_qm_dqusage_adjust()
1158 if (error == -EINVAL || error == -ENOENT) in xfs_qm_dqusage_adjust()
1160 if (error) in xfs_qm_dqusage_adjust()
1161 return error; in xfs_qm_dqusage_adjust()
1169 error = xfs_inode_reload_unlinked(ip); in xfs_qm_dqusage_adjust()
1170 if (error) { in xfs_qm_dqusage_adjust()
1181 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_qm_dqusage_adjust()
1182 if (error) in xfs_qm_dqusage_adjust()
1204 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_USER, nblks, in xfs_qm_dqusage_adjust()
1206 if (error) in xfs_qm_dqusage_adjust()
1211 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_GROUP, nblks, in xfs_qm_dqusage_adjust()
1213 if (error) in xfs_qm_dqusage_adjust()
1218 error = xfs_qm_quotacheck_dqadjust(ip, XFS_DQTYPE_PROJ, nblks, in xfs_qm_dqusage_adjust()
1220 if (error) in xfs_qm_dqusage_adjust()
1226 return error; in xfs_qm_dqusage_adjust()
1237 int error = 0; in xfs_qm_flush_one() local
1255 error = xfs_buf_incore(mp->m_ddev_targp, dqp->q_blkno, in xfs_qm_flush_one()
1257 if (error) in xfs_qm_flush_one()
1261 error = -EAGAIN; in xfs_qm_flush_one()
1270 error = -EAGAIN; in xfs_qm_flush_one()
1274 error = xfs_qm_dqflush(dqp, &bp); in xfs_qm_flush_one()
1275 if (error) in xfs_qm_flush_one()
1282 return error; in xfs_qm_flush_one()
1293 int error, error2; in xfs_qm_quotacheck() local
1313 error = xfs_qm_reset_dqcounts_buf(mp, uip, XFS_DQTYPE_USER, in xfs_qm_quotacheck()
1315 if (error) in xfs_qm_quotacheck()
1321 error = xfs_qm_reset_dqcounts_buf(mp, gip, XFS_DQTYPE_GROUP, in xfs_qm_quotacheck()
1323 if (error) in xfs_qm_quotacheck()
1329 error = xfs_qm_reset_dqcounts_buf(mp, pip, XFS_DQTYPE_PROJ, in xfs_qm_quotacheck()
1331 if (error) in xfs_qm_quotacheck()
1337 error = xfs_iwalk_threaded(mp, 0, 0, xfs_qm_dqusage_adjust, 0, true, in xfs_qm_quotacheck()
1346 if (error) in xfs_qm_quotacheck()
1354 error = xfs_qm_dquot_walk(mp, XFS_DQTYPE_USER, xfs_qm_flush_one, in xfs_qm_quotacheck()
1360 if (!error) in xfs_qm_quotacheck()
1361 error = error2; in xfs_qm_quotacheck()
1366 if (!error) in xfs_qm_quotacheck()
1367 error = error2; in xfs_qm_quotacheck()
1371 if (!error) in xfs_qm_quotacheck()
1372 error = error2; in xfs_qm_quotacheck()
1381 if (error) in xfs_qm_quotacheck()
1395 if (error) { in xfs_qm_quotacheck()
1398 error); in xfs_qm_quotacheck()
1410 return error; in xfs_qm_quotacheck()
1441 int error = 0; in xfs_qm_mount_quotas() local
1460 error = xfs_qm_init_quotainfo(mp); in xfs_qm_mount_quotas()
1461 if (error) { in xfs_qm_mount_quotas()
1473 error = xfs_qm_quotacheck(mp); in xfs_qm_mount_quotas()
1474 if (error) { in xfs_qm_mount_quotas()
1515 if (error) { in xfs_qm_mount_quotas()
1532 int error; in xfs_qm_init_quotainos() local
1544 error = xfs_iget(mp, NULL, mp->m_sb.sb_uquotino, in xfs_qm_init_quotainos()
1546 if (error) in xfs_qm_init_quotainos()
1547 return error; in xfs_qm_init_quotainos()
1552 error = xfs_iget(mp, NULL, mp->m_sb.sb_gquotino, in xfs_qm_init_quotainos()
1554 if (error) in xfs_qm_init_quotainos()
1560 error = xfs_iget(mp, NULL, mp->m_sb.sb_pquotino, in xfs_qm_init_quotainos()
1562 if (error) in xfs_qm_init_quotainos()
1576 error = xfs_qm_qino_alloc(mp, &uip, in xfs_qm_init_quotainos()
1578 if (error) in xfs_qm_init_quotainos()
1584 error = xfs_qm_qino_alloc(mp, &gip, in xfs_qm_init_quotainos()
1586 if (error) in xfs_qm_init_quotainos()
1592 error = xfs_qm_qino_alloc(mp, &pip, in xfs_qm_init_quotainos()
1594 if (error) in xfs_qm_init_quotainos()
1611 return error; in xfs_qm_init_quotainos()
1678 int error; in xfs_qm_vop_dqalloc() local
1695 error = xfs_qm_dqattach_locked(ip, true); in xfs_qm_vop_dqalloc()
1696 if (error) { in xfs_qm_vop_dqalloc()
1698 return error; in xfs_qm_vop_dqalloc()
1715 error = xfs_qm_dqget(mp, from_kuid(user_ns, uid), in xfs_qm_vop_dqalloc()
1717 if (error) { in xfs_qm_vop_dqalloc()
1718 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1719 return error; in xfs_qm_vop_dqalloc()
1740 error = xfs_qm_dqget(mp, from_kgid(user_ns, gid), in xfs_qm_vop_dqalloc()
1742 if (error) { in xfs_qm_vop_dqalloc()
1743 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1758 error = xfs_qm_dqget(mp, prid, in xfs_qm_vop_dqalloc()
1760 if (error) { in xfs_qm_vop_dqalloc()
1761 ASSERT(error != -ENOENT); in xfs_qm_vop_dqalloc()
1792 return error; in xfs_qm_vop_dqalloc()
1870 int error; in xfs_qm_vop_rename_dqattach() local
1877 error = xfs_qm_dqattach(ip); in xfs_qm_vop_rename_dqattach()
1878 if (error) in xfs_qm_vop_rename_dqattach()
1879 return error; in xfs_qm_vop_rename_dqattach()