Lines Matching refs:error

145 	int			error;  in xfs_attr_get()  local
160 error = xfs_attr_get_ilocked(args); in xfs_attr_get()
163 return error; in xfs_attr_get()
208 int error; in xfs_attr_try_sf_addname() local
216 error = xfs_attr_shortform_addname(args); in xfs_attr_try_sf_addname()
217 if (error == -ENOSPC) in xfs_attr_try_sf_addname()
218 return error; in xfs_attr_try_sf_addname()
224 if (!error && !(args->op_flags & XFS_DA_OP_NOTIME)) in xfs_attr_try_sf_addname()
230 return error; in xfs_attr_try_sf_addname()
255 int error; in xfs_attr_trans_roll() local
264 error = xfs_defer_finish(&args->trans); in xfs_attr_trans_roll()
266 error = xfs_trans_roll_inode(&args->trans, args->dp); in xfs_attr_trans_roll()
268 return error; in xfs_attr_trans_roll()
279 int error = 0; in xfs_attr_set_args() local
285 error = xfs_attr_set_iter(&dac, &leaf_bp); in xfs_attr_set_args()
286 if (error != -EAGAIN) in xfs_attr_set_args()
289 error = xfs_attr_trans_roll(&dac); in xfs_attr_set_args()
290 if (error) { in xfs_attr_set_args()
293 return error; in xfs_attr_set_args()
297 return error; in xfs_attr_set_args()
307 int error = 0; in xfs_attr_sf_addname() local
312 error = xfs_attr_try_sf_addname(dp, args); in xfs_attr_sf_addname()
315 if (error != -ENOSPC) in xfs_attr_sf_addname()
316 return error; in xfs_attr_sf_addname()
322 error = xfs_attr_shortform_to_leaf(args, leaf_bp); in xfs_attr_sf_addname()
323 if (error) in xfs_attr_sf_addname()
324 return error; in xfs_attr_sf_addname()
358 int forkoff, error = 0; in xfs_attr_set_iter() local
378 error = xfs_attr_leaf_try_add(args, *leaf_bp); in xfs_attr_set_iter()
379 if (error == -ENOSPC) { in xfs_attr_set_iter()
380 error = xfs_attr3_leaf_to_node(args); in xfs_attr_set_iter()
381 if (error) in xfs_attr_set_iter()
382 return error; in xfs_attr_set_iter()
401 } else if (error) { in xfs_attr_set_iter()
402 return error; in xfs_attr_set_iter()
407 error = xfs_attr_node_addname_find_attr(dac); in xfs_attr_set_iter()
408 if (error) in xfs_attr_set_iter()
409 return error; in xfs_attr_set_iter()
411 error = xfs_attr_node_addname(dac); in xfs_attr_set_iter()
412 if (error) in xfs_attr_set_iter()
413 return error; in xfs_attr_set_iter()
431 error = xfs_attr_rmtval_find_space(dac); in xfs_attr_set_iter()
432 if (error) in xfs_attr_set_iter()
433 return error; in xfs_attr_set_iter()
442 error = xfs_attr_rmtval_set_blk(dac); in xfs_attr_set_iter()
443 if (error) in xfs_attr_set_iter()
444 return error; in xfs_attr_set_iter()
450 error = xfs_attr_rmtval_set_value(args); in xfs_attr_set_iter()
451 if (error) in xfs_attr_set_iter()
452 return error; in xfs_attr_set_iter()
460 error = xfs_attr3_leaf_clearflag(args); in xfs_attr_set_iter()
461 return error; in xfs_attr_set_iter()
473 error = xfs_attr3_leaf_flipflags(args); in xfs_attr_set_iter()
474 if (error) in xfs_attr_set_iter()
475 return error; in xfs_attr_set_iter()
489 error = xfs_attr_rmtval_invalidate(args); in xfs_attr_set_iter()
490 if (error) in xfs_attr_set_iter()
491 return error; in xfs_attr_set_iter()
498 error = xfs_attr_rmtval_remove(dac); in xfs_attr_set_iter()
499 if (error == -EAGAIN) in xfs_attr_set_iter()
502 if (error) in xfs_attr_set_iter()
503 return error; in xfs_attr_set_iter()
517 error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, in xfs_attr_set_iter()
519 if (error) in xfs_attr_set_iter()
520 return error; in xfs_attr_set_iter()
526 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); in xfs_attr_set_iter()
529 return error; in xfs_attr_set_iter()
537 error = xfs_attr_rmtval_find_space(dac); in xfs_attr_set_iter()
538 if (error) in xfs_attr_set_iter()
539 return error; in xfs_attr_set_iter()
553 error = xfs_attr_rmtval_set_blk(dac); in xfs_attr_set_iter()
554 if (error) in xfs_attr_set_iter()
555 return error; in xfs_attr_set_iter()
561 error = xfs_attr_rmtval_set_value(args); in xfs_attr_set_iter()
562 if (error) in xfs_attr_set_iter()
563 return error; in xfs_attr_set_iter()
572 error = xfs_attr3_leaf_clearflag(args); in xfs_attr_set_iter()
585 error = xfs_attr3_leaf_flipflags(args); in xfs_attr_set_iter()
586 if (error) in xfs_attr_set_iter()
603 error = xfs_attr_rmtval_invalidate(args); in xfs_attr_set_iter()
604 if (error) in xfs_attr_set_iter()
605 return error; in xfs_attr_set_iter()
612 error = xfs_attr_rmtval_remove(dac); in xfs_attr_set_iter()
613 if (error == -EAGAIN) in xfs_attr_set_iter()
617 if (error) in xfs_attr_set_iter()
618 return error; in xfs_attr_set_iter()
631 error = xfs_attr_node_addname_clear_incomplete(dac); in xfs_attr_set_iter()
638 return error; in xfs_attr_set_iter()
651 int error; in xfs_attr_lookup() local
660 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_lookup()
665 return error; in xfs_attr_lookup()
678 int error; in xfs_attr_remove_args() local
684 error = xfs_attr_remove_iter(&dac); in xfs_attr_remove_args()
685 if (error != -EAGAIN) in xfs_attr_remove_args()
688 error = xfs_attr_trans_roll(&dac); in xfs_attr_remove_args()
689 if (error) in xfs_attr_remove_args()
690 return error; in xfs_attr_remove_args()
694 return error; in xfs_attr_remove_args()
709 int error, local; in xfs_attr_set() local
716 error = xfs_qm_dqattach(dp); in xfs_attr_set()
717 if (error) in xfs_attr_set()
718 return error; in xfs_attr_set()
746 error = xfs_bmap_add_attrfork(dp, sf_size, rsvd); in xfs_attr_set()
747 if (error) in xfs_attr_set()
748 return error; in xfs_attr_set()
772 error = xfs_trans_alloc_inode(dp, &tres, total, 0, rsvd, &args->trans); in xfs_attr_set()
773 if (error) in xfs_attr_set()
774 return error; in xfs_attr_set()
777 error = xfs_iext_count_may_overflow(dp, XFS_ATTR_FORK, in xfs_attr_set()
779 if (error) in xfs_attr_set()
783 error = xfs_attr_lookup(args); in xfs_attr_set()
785 if (error == -EEXIST && (args->attr_flags & XATTR_CREATE)) in xfs_attr_set()
787 if (error == -ENOATTR && (args->attr_flags & XATTR_REPLACE)) in xfs_attr_set()
789 if (error != -ENOATTR && error != -EEXIST) in xfs_attr_set()
792 error = xfs_attr_set_args(args); in xfs_attr_set()
793 if (error) in xfs_attr_set()
799 if (error != -EEXIST) in xfs_attr_set()
802 error = xfs_attr_remove_args(args); in xfs_attr_set()
803 if (error) in xfs_attr_set()
821 error = xfs_trans_commit(args->trans); in xfs_attr_set()
824 return error; in xfs_attr_set()
980 int error = 0; in xfs_attr_leaf_hasname() local
982 error = xfs_attr3_leaf_read(args->trans, args->dp, 0, bp); in xfs_attr_leaf_hasname()
983 if (error) in xfs_attr_leaf_hasname()
984 return error; in xfs_attr_leaf_hasname()
986 error = xfs_attr3_leaf_lookup_int(*bp, args); in xfs_attr_leaf_hasname()
987 if (error != -ENOATTR && error != -EEXIST) in xfs_attr_leaf_hasname()
990 return error; in xfs_attr_leaf_hasname()
1005 int error, forkoff; in xfs_attr_leaf_removename() local
1014 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_leaf_removename()
1016 if (error == -ENOATTR) { in xfs_attr_leaf_removename()
1018 return error; in xfs_attr_leaf_removename()
1019 } else if (error != -EEXIST) in xfs_attr_leaf_removename()
1020 return error; in xfs_attr_leaf_removename()
1047 int error; in xfs_attr_leaf_get() local
1051 error = xfs_attr_leaf_hasname(args, &bp); in xfs_attr_leaf_get()
1053 if (error == -ENOATTR) { in xfs_attr_leaf_get()
1055 return error; in xfs_attr_leaf_get()
1056 } else if (error != -EEXIST) in xfs_attr_leaf_get()
1057 return error; in xfs_attr_leaf_get()
1060 error = xfs_attr3_leaf_getvalue(bp, args); in xfs_attr_leaf_get()
1062 return error; in xfs_attr_leaf_get()
1076 int retval, error; in xfs_attr_node_hasname() local
1085 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_hasname()
1086 if (error) in xfs_attr_node_hasname()
1087 retval = error; in xfs_attr_node_hasname()
1112 goto error; in xfs_attr_node_addname_find_attr()
1115 goto error; in xfs_attr_node_addname_find_attr()
1118 goto error; in xfs_attr_node_addname_find_attr()
1137 error: in xfs_attr_node_addname_find_attr()
1165 int error; in xfs_attr_node_addname() local
1172 error = xfs_attr3_leaf_add(blk->bp, state->args); in xfs_attr_node_addname()
1173 if (error == -ENOSPC) { in xfs_attr_node_addname()
1182 error = xfs_attr3_leaf_to_node(args); in xfs_attr_node_addname()
1183 if (error) in xfs_attr_node_addname()
1205 error = xfs_da3_split(state); in xfs_attr_node_addname()
1206 if (error) in xfs_attr_node_addname()
1219 return error; in xfs_attr_node_addname()
1230 int error = 0; in xfs_attr_node_addname_clear_incomplete() local
1239 error = xfs_da3_node_lookup_int(state, &retval); in xfs_attr_node_addname_clear_incomplete()
1240 if (error) in xfs_attr_node_addname_clear_incomplete()
1243 error = xfs_attr_node_removename(args, state); in xfs_attr_node_addname_clear_incomplete()
1249 error = xfs_da3_join(state); in xfs_attr_node_addname_clear_incomplete()
1250 if (error) in xfs_attr_node_addname_clear_incomplete()
1253 retval = error = 0; in xfs_attr_node_addname_clear_incomplete()
1258 if (error) in xfs_attr_node_addname_clear_incomplete()
1259 return error; in xfs_attr_node_addname_clear_incomplete()
1272 int error, forkoff; in xfs_attr_node_shrink() local
1282 error = xfs_attr3_leaf_read(args->trans, args->dp, 0, &bp); in xfs_attr_node_shrink()
1283 if (error) in xfs_attr_node_shrink()
1284 return error; in xfs_attr_node_shrink()
1288 error = xfs_attr3_leaf_to_shortform(bp, args, forkoff); in xfs_attr_node_shrink()
1293 return error; in xfs_attr_node_shrink()
1305 int error; in xfs_attr_leaf_mark_incomplete() local
1312 error = xfs_attr_fillstate(state); in xfs_attr_leaf_mark_incomplete()
1313 if (error) in xfs_attr_leaf_mark_incomplete()
1314 return error; in xfs_attr_leaf_mark_incomplete()
1333 int error; in xfs_attr_node_removename_setup() local
1335 error = xfs_attr_node_hasname(args, state); in xfs_attr_node_removename_setup()
1336 if (error != -EEXIST) in xfs_attr_node_removename_setup()
1338 error = 0; in xfs_attr_node_removename_setup()
1345 error = xfs_attr_leaf_mark_incomplete(args, *state); in xfs_attr_node_removename_setup()
1346 if (error) in xfs_attr_node_removename_setup()
1349 error = xfs_attr_rmtval_invalidate(args); in xfs_attr_node_removename_setup()
1352 if (error) in xfs_attr_node_removename_setup()
1355 return error; in xfs_attr_node_removename_setup()
1395 int retval, error = 0; in xfs_attr_remove_iter() local
1420 error = xfs_attr_node_removename_setup(dac); in xfs_attr_remove_iter()
1421 if (error) in xfs_attr_remove_iter()
1422 return error; in xfs_attr_remove_iter()
1441 error = xfs_attr_rmtval_remove(dac); in xfs_attr_remove_iter()
1442 if (error == -EAGAIN) { in xfs_attr_remove_iter()
1445 return error; in xfs_attr_remove_iter()
1446 } else if (error) { in xfs_attr_remove_iter()
1456 error = xfs_attr_refillstate(state); in xfs_attr_remove_iter()
1457 if (error) in xfs_attr_remove_iter()
1472 error = xfs_attr_refillstate(state); in xfs_attr_remove_iter()
1473 if (error) in xfs_attr_remove_iter()
1484 error = xfs_da3_join(state); in xfs_attr_remove_iter()
1485 if (error) in xfs_attr_remove_iter()
1503 error = xfs_attr_node_shrink(args, state); in xfs_attr_remove_iter()
1504 ASSERT(error != -EAGAIN); in xfs_attr_remove_iter()
1508 error = -EINVAL; in xfs_attr_remove_iter()
1514 return error; in xfs_attr_remove_iter()
1576 int level, error; in xfs_attr_refillstate() local
1588 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1591 if (error) in xfs_attr_refillstate()
1592 return error; in xfs_attr_refillstate()
1606 error = xfs_da3_node_read_mapped(state->args->trans, in xfs_attr_refillstate()
1609 if (error) in xfs_attr_refillstate()
1610 return error; in xfs_attr_refillstate()
1635 int error; in xfs_attr_node_get() local
1642 error = xfs_attr_node_hasname(args, &state); in xfs_attr_node_get()
1643 if (error != -EEXIST) in xfs_attr_node_get()
1650 error = xfs_attr3_leaf_getvalue(blk->bp, args); in xfs_attr_node_get()
1663 return error; in xfs_attr_node_get()