Lines Matching refs:error
683 int error; in xfs_lookup() local
691 error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); in xfs_lookup()
692 if (error) in xfs_lookup()
695 error = xfs_iget(dp->i_mount, NULL, inum, 0, 0, ipp); in xfs_lookup()
696 if (error) in xfs_lookup()
708 return error; in xfs_lookup()
758 int error; in xfs_ialloc() local
765 error = xfs_dialloc(tp, pip ? pip->i_ino : 0, mode, okalloc, in xfs_ialloc()
767 if (error) in xfs_ialloc()
768 return error; in xfs_ialloc()
780 error = xfs_iget(mp, tp, ino, XFS_IGET_CREATE, in xfs_ialloc()
782 if (error) in xfs_ialloc()
783 return error; in xfs_ialloc()
1090 int error; in xfs_droplink() local
1099 error = 0; in xfs_droplink()
1107 error = xfs_iunlink(tp, ip); in xfs_droplink()
1109 return error; in xfs_droplink()
1142 int error; in xfs_create() local
1164 error = xfs_qm_vop_dqalloc(dp, xfs_kuid_to_uid(current_fsuid()), in xfs_create()
1168 if (error) in xfs_create()
1169 return error; in xfs_create()
1188 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create()
1189 if (error == -ENOSPC) { in xfs_create()
1192 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create()
1194 if (error == -ENOSPC) { in xfs_create()
1197 error = xfs_trans_reserve(tp, tres, 0, 0); in xfs_create()
1199 if (error) in xfs_create()
1212 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create()
1214 if (error) in xfs_create()
1218 error = xfs_dir_canenter(tp, dp, name); in xfs_create()
1219 if (error) in xfs_create()
1228 error = xfs_dir_ialloc(&tp, dp, mode, is_dir ? 2 : 1, rdev, in xfs_create()
1230 if (error) in xfs_create()
1243 error = xfs_dir_createname(tp, dp, name, ip->i_ino, in xfs_create()
1246 if (error) { in xfs_create()
1247 ASSERT(error != -ENOSPC); in xfs_create()
1254 error = xfs_dir_init(tp, ip, dp); in xfs_create()
1255 if (error) in xfs_create()
1258 error = xfs_bumplink(tp, dp); in xfs_create()
1259 if (error) in xfs_create()
1278 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_create()
1279 if (error) in xfs_create()
1282 error = xfs_trans_commit(tp); in xfs_create()
1283 if (error) in xfs_create()
1314 return error; in xfs_create()
1327 int error; in xfs_create_tmpfile() local
1343 error = xfs_qm_vop_dqalloc(dp, xfs_kuid_to_uid(current_fsuid()), in xfs_create_tmpfile()
1347 if (error) in xfs_create_tmpfile()
1348 return error; in xfs_create_tmpfile()
1354 error = xfs_trans_reserve(tp, tres, resblks, 0); in xfs_create_tmpfile()
1355 if (error == -ENOSPC) { in xfs_create_tmpfile()
1358 error = xfs_trans_reserve(tp, tres, 0, 0); in xfs_create_tmpfile()
1360 if (error) in xfs_create_tmpfile()
1363 error = xfs_trans_reserve_quota(tp, mp, udqp, gdqp, in xfs_create_tmpfile()
1365 if (error) in xfs_create_tmpfile()
1368 error = xfs_dir_ialloc(&tp, dp, mode, 1, 0, in xfs_create_tmpfile()
1370 if (error) in xfs_create_tmpfile()
1384 error = xfs_iunlink(tp, ip); in xfs_create_tmpfile()
1385 if (error) in xfs_create_tmpfile()
1388 error = xfs_trans_commit(tp); in xfs_create_tmpfile()
1389 if (error) in xfs_create_tmpfile()
1416 return error; in xfs_create_tmpfile()
1427 int error; in xfs_link() local
1440 error = xfs_qm_dqattach(sip, 0); in xfs_link()
1441 if (error) in xfs_link()
1444 error = xfs_qm_dqattach(tdp, 0); in xfs_link()
1445 if (error) in xfs_link()
1450 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, resblks, 0); in xfs_link()
1451 if (error == -ENOSPC) { in xfs_link()
1453 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_link, 0, 0); in xfs_link()
1455 if (error) in xfs_link()
1471 error = -EXDEV; in xfs_link()
1476 error = xfs_dir_canenter(tp, tdp, target_name); in xfs_link()
1477 if (error) in xfs_link()
1484 error = xfs_iunlink_remove(tp, sip); in xfs_link()
1485 if (error) in xfs_link()
1489 error = xfs_dir_createname(tp, tdp, target_name, sip->i_ino, in xfs_link()
1491 if (error) in xfs_link()
1496 error = xfs_bumplink(tp, sip); in xfs_link()
1497 if (error) in xfs_link()
1509 error = xfs_bmap_finish (&tp, &free_list, &committed); in xfs_link()
1510 if (error) { in xfs_link()
1520 return error; in xfs_link()
1559 int error = 0; in xfs_itruncate_extents() local
1591 error = xfs_bunmapi(tp, ip, in xfs_itruncate_extents()
1597 if (error) in xfs_itruncate_extents()
1604 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_itruncate_extents()
1607 if (error) in xfs_itruncate_extents()
1610 error = xfs_trans_roll(&tp, ip); in xfs_itruncate_extents()
1611 if (error) in xfs_itruncate_extents()
1625 return error; in xfs_itruncate_extents()
1641 int error; in xfs_release() local
1667 error = filemap_flush(VFS_I(ip)->i_mapping); in xfs_release()
1668 if (error) in xfs_release()
1669 return error; in xfs_release()
1703 error = xfs_free_eofblocks(mp, ip, true); in xfs_release()
1704 if (error && error != -EAGAIN) in xfs_release()
1705 return error; in xfs_release()
1725 int error; in xfs_inactive_truncate() local
1728 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_itruncate, 0, 0); in xfs_inactive_truncate()
1729 if (error) { in xfs_inactive_truncate()
1732 return error; in xfs_inactive_truncate()
1746 error = xfs_itruncate_extents(&tp, ip, XFS_DATA_FORK, 0); in xfs_inactive_truncate()
1747 if (error) in xfs_inactive_truncate()
1752 error = xfs_trans_commit(tp); in xfs_inactive_truncate()
1753 if (error) in xfs_inactive_truncate()
1763 return error; in xfs_inactive_truncate()
1780 int error; in xfs_inactive_ifree() local
1800 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_ifree, in xfs_inactive_ifree()
1802 if (error) { in xfs_inactive_ifree()
1803 if (error == -ENOSPC) { in xfs_inactive_ifree()
1811 return error; in xfs_inactive_ifree()
1818 error = xfs_ifree(tp, ip, &free_list); in xfs_inactive_ifree()
1819 if (error) { in xfs_inactive_ifree()
1827 __func__, error); in xfs_inactive_ifree()
1832 return error; in xfs_inactive_ifree()
1844 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_inactive_ifree()
1845 if (error) { in xfs_inactive_ifree()
1847 __func__, error); in xfs_inactive_ifree()
1850 error = xfs_trans_commit(tp); in xfs_inactive_ifree()
1851 if (error) in xfs_inactive_ifree()
1853 __func__, error); in xfs_inactive_ifree()
1872 int error; in xfs_inactive() local
1908 error = xfs_qm_dqattach(ip, 0); in xfs_inactive()
1909 if (error) in xfs_inactive()
1913 error = xfs_inactive_symlink(ip); in xfs_inactive()
1915 error = xfs_inactive_truncate(ip); in xfs_inactive()
1916 if (error) in xfs_inactive()
1925 error = xfs_attr_inactive(ip); in xfs_inactive()
1926 if (error) in xfs_inactive()
1937 error = xfs_inactive_ifree(ip); in xfs_inactive()
1938 if (error) in xfs_inactive()
1965 int error; in xfs_iunlink() local
1976 error = xfs_read_agi(mp, tp, XFS_INO_TO_AGNO(mp, ip->i_ino), &agibp); in xfs_iunlink()
1977 if (error) in xfs_iunlink()
1978 return error; in xfs_iunlink()
1998 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink()
2000 if (error) in xfs_iunlink()
2001 return error; in xfs_iunlink()
2051 int error; in xfs_iunlink_remove() local
2060 error = xfs_read_agi(mp, tp, agno, &agibp); in xfs_iunlink_remove()
2061 if (error) in xfs_iunlink_remove()
2062 return error; in xfs_iunlink_remove()
2084 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2086 if (error) { in xfs_iunlink_remove()
2088 __func__, error); in xfs_iunlink_remove()
2089 return error; in xfs_iunlink_remove()
2134 error = xfs_imap(mp, tp, next_ino, &imap, 0); in xfs_iunlink_remove()
2135 if (error) { in xfs_iunlink_remove()
2138 __func__, error); in xfs_iunlink_remove()
2139 return error; in xfs_iunlink_remove()
2142 error = xfs_imap_to_bp(mp, tp, &imap, &last_dip, in xfs_iunlink_remove()
2144 if (error) { in xfs_iunlink_remove()
2147 __func__, error); in xfs_iunlink_remove()
2148 return error; in xfs_iunlink_remove()
2161 error = xfs_imap_to_bp(mp, tp, &ip->i_imap, &dip, &ibp, in xfs_iunlink_remove()
2163 if (error) { in xfs_iunlink_remove()
2165 __func__, error); in xfs_iunlink_remove()
2166 return error; in xfs_iunlink_remove()
2404 int error; in xfs_ifree() local
2417 error = xfs_iunlink_remove(tp, ip); in xfs_ifree()
2418 if (error) in xfs_ifree()
2419 return error; in xfs_ifree()
2421 error = xfs_difree(tp, ip->i_ino, flist, &xic); in xfs_ifree()
2422 if (error) in xfs_ifree()
2423 return error; in xfs_ifree()
2439 error = xfs_ifree_cluster(ip, tp, &xic); in xfs_ifree()
2441 return error; in xfs_ifree()
2523 int error = 0; in xfs_remove() local
2534 error = xfs_qm_dqattach(dp, 0); in xfs_remove()
2535 if (error) in xfs_remove()
2538 error = xfs_qm_dqattach(ip, 0); in xfs_remove()
2539 if (error) in xfs_remove()
2557 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, resblks, 0); in xfs_remove()
2558 if (error == -ENOSPC) { in xfs_remove()
2560 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_remove, 0, 0); in xfs_remove()
2562 if (error) { in xfs_remove()
2563 ASSERT(error != -ENOSPC); in xfs_remove()
2579 error = -ENOTEMPTY; in xfs_remove()
2583 error = -ENOTEMPTY; in xfs_remove()
2588 error = xfs_droplink(tp, dp); in xfs_remove()
2589 if (error) in xfs_remove()
2593 error = xfs_droplink(tp, ip); in xfs_remove()
2594 if (error) in xfs_remove()
2607 error = xfs_droplink(tp, ip); in xfs_remove()
2608 if (error) in xfs_remove()
2612 error = xfs_dir_removename(tp, dp, name, ip->i_ino, in xfs_remove()
2614 if (error) { in xfs_remove()
2615 ASSERT(error != -ENOENT); in xfs_remove()
2627 error = xfs_bmap_finish(&tp, &free_list, &committed); in xfs_remove()
2628 if (error) in xfs_remove()
2631 error = xfs_trans_commit(tp); in xfs_remove()
2632 if (error) in xfs_remove()
2645 return error; in xfs_remove()
2705 int error; in xfs_finish_rename() local
2714 error = xfs_bmap_finish(&tp, free_list, &committed); in xfs_finish_rename()
2715 if (error) { in xfs_finish_rename()
2718 return error; in xfs_finish_rename()
2742 int error = 0; in xfs_cross_rename() local
2748 error = xfs_dir_replace(tp, dp1, name1, in xfs_cross_rename()
2751 if (error) in xfs_cross_rename()
2755 error = xfs_dir_replace(tp, dp2, name2, in xfs_cross_rename()
2758 if (error) in xfs_cross_rename()
2770 error = xfs_dir_replace(tp, ip2, &xfs_name_dotdot, in xfs_cross_rename()
2773 if (error) in xfs_cross_rename()
2778 error = xfs_droplink(tp, dp2); in xfs_cross_rename()
2779 if (error) in xfs_cross_rename()
2781 error = xfs_bumplink(tp, dp1); in xfs_cross_rename()
2782 if (error) in xfs_cross_rename()
2797 error = xfs_dir_replace(tp, ip1, &xfs_name_dotdot, in xfs_cross_rename()
2800 if (error) in xfs_cross_rename()
2805 error = xfs_droplink(tp, dp1); in xfs_cross_rename()
2806 if (error) in xfs_cross_rename()
2808 error = xfs_bumplink(tp, dp2); in xfs_cross_rename()
2809 if (error) in xfs_cross_rename()
2843 return error; in xfs_cross_rename()
2860 int error; in xfs_rename_alloc_whiteout() local
2862 error = xfs_create_tmpfile(dp, NULL, S_IFCHR | WHITEOUT_MODE, &tmpfile); in xfs_rename_alloc_whiteout()
2863 if (error) in xfs_rename_alloc_whiteout()
2864 return error; in xfs_rename_alloc_whiteout()
2903 int error; in xfs_rename() local
2917 error = xfs_rename_alloc_whiteout(target_dp, &wip); in xfs_rename()
2918 if (error) in xfs_rename()
2919 return error; in xfs_rename()
2930 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, spaceres, 0); in xfs_rename()
2931 if (error == -ENOSPC) { in xfs_rename()
2933 error = xfs_trans_reserve(tp, &M_RES(mp)->tr_rename, 0, 0); in xfs_rename()
2935 if (error) in xfs_rename()
2941 error = xfs_qm_vop_rename_dqattach(inodes); in xfs_rename()
2942 if (error) in xfs_rename()
2980 error = -EXDEV; in xfs_rename()
3001 error = xfs_dir_canenter(tp, target_dp, target_name); in xfs_rename()
3002 if (error) in xfs_rename()
3010 error = xfs_dir_createname(tp, target_dp, target_name, in xfs_rename()
3013 if (error) in xfs_rename()
3020 error = xfs_bumplink(tp, target_dp); in xfs_rename()
3021 if (error) in xfs_rename()
3036 error = -EEXIST; in xfs_rename()
3050 error = xfs_dir_replace(tp, target_dp, target_name, in xfs_rename()
3053 if (error) in xfs_rename()
3063 error = xfs_droplink(tp, target_ip); in xfs_rename()
3064 if (error) in xfs_rename()
3071 error = xfs_droplink(tp, target_ip); in xfs_rename()
3072 if (error) in xfs_rename()
3085 error = xfs_dir_replace(tp, src_ip, &xfs_name_dotdot, in xfs_rename()
3088 ASSERT(error != -EEXIST); in xfs_rename()
3089 if (error) in xfs_rename()
3114 error = xfs_droplink(tp, src_dp); in xfs_rename()
3115 if (error) in xfs_rename()
3125 error = xfs_dir_replace(tp, src_dp, src_name, wip->i_ino, in xfs_rename()
3128 error = xfs_dir_removename(tp, src_dp, src_name, src_ip->i_ino, in xfs_rename()
3130 if (error) in xfs_rename()
3143 error = xfs_bumplink(tp, wip); in xfs_rename()
3144 if (error) in xfs_rename()
3146 error = xfs_iunlink_remove(tp, wip); in xfs_rename()
3147 if (error) in xfs_rename()
3164 error = xfs_finish_rename(tp, &free_list); in xfs_rename()
3167 return error; in xfs_rename()
3175 return error; in xfs_rename()
3262 int error; in xfs_iflush_cluster() local
3263 error = xfs_iflush_int(iq, bp); in xfs_iflush_cluster()
3264 if (error) { in xfs_iflush_cluster()
3348 int error; in xfs_iflush() local
3383 error = -EIO; in xfs_iflush()
3396 error = xfs_imap_to_bp(mp, NULL, &ip->i_imap, &dip, &bp, XBF_TRYLOCK, in xfs_iflush()
3398 if (error == -EAGAIN) { in xfs_iflush()
3400 return error; in xfs_iflush()
3402 if (error) in xfs_iflush()
3408 error = xfs_iflush_int(ip, bp); in xfs_iflush()
3409 if (error) in xfs_iflush()
3423 error = xfs_iflush_cluster(ip, bp); in xfs_iflush()
3424 if (error) in xfs_iflush()
3435 error = -EFSCORRUPTED; in xfs_iflush()
3441 return error; in xfs_iflush()