Lines Matching full:error

81 	int error = 0;  in ea_foreach_i()  local
95 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i()
96 if (error) in ea_foreach_i()
97 return error; in ea_foreach_i()
107 return error; in ea_foreach_i()
118 int error; in ea_foreach() local
120 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &bh); in ea_foreach()
121 if (error) in ea_foreach()
122 return error; in ea_foreach()
125 error = ea_foreach_i(ip, bh, ea_call, data); in ea_foreach()
130 error = -EIO; in ea_foreach()
144 error = gfs2_meta_read(ip->i_gl, bn, DIO_WAIT, 0, &eabh); in ea_foreach()
145 if (error) in ea_foreach()
147 error = ea_foreach_i(ip, eabh, ea_call, data); in ea_foreach()
149 if (error) in ea_foreach()
154 return error; in ea_foreach()
192 int error; in gfs2_ea_find() local
201 error = ea_foreach(ip, ea_find_i, &ef); in gfs2_ea_find()
202 if (error > 0) in gfs2_ea_find()
205 return error; in gfs2_ea_find()
237 int error; in ea_dealloc_unstuffed() local
239 error = gfs2_rindex_update(sdp); in ea_dealloc_unstuffed()
240 if (error) in ea_dealloc_unstuffed()
241 return error; in ea_dealloc_unstuffed()
262 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &rg_gh); in ea_dealloc_unstuffed()
263 if (error) in ea_dealloc_unstuffed()
264 return error; in ea_dealloc_unstuffed()
266 error = gfs2_trans_begin(sdp, rgd->rd_length + RES_DINODE + in ea_dealloc_unstuffed()
268 if (error) in ea_dealloc_unstuffed()
314 return error; in ea_dealloc_unstuffed()
321 int error; in ea_remove_unstuffed() local
323 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_remove_unstuffed()
324 if (error) in ea_remove_unstuffed()
325 return error; in ea_remove_unstuffed()
327 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in ea_remove_unstuffed()
328 if (error) in ea_remove_unstuffed()
331 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL); in ea_remove_unstuffed()
335 return error; in ea_remove_unstuffed()
395 * Returns: actual size of data on success, -errno on error
403 int error; in gfs2_listxattr() local
411 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); in gfs2_listxattr()
412 if (error) in gfs2_listxattr()
413 return error; in gfs2_listxattr()
418 error = ea_foreach(ip, ea_list_i, &ei); in gfs2_listxattr()
419 if (!error) in gfs2_listxattr()
420 error = ei.ei_size; in gfs2_listxattr()
425 return error; in gfs2_listxattr()
448 int error = 0; in gfs2_iter_unstuffed() local
457 error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*dataptrs), 0, 0, in gfs2_iter_unstuffed()
459 if (error) { in gfs2_iter_unstuffed()
468 error = gfs2_meta_wait(sdp, bh[x]); in gfs2_iter_unstuffed()
469 if (error) { in gfs2_iter_unstuffed()
477 error = -EIO; in gfs2_iter_unstuffed()
501 return error; in gfs2_iter_unstuffed()
525 int error; in gfs2_xattr_acl_get() local
529 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, name, &el); in gfs2_xattr_acl_get()
530 if (error) in gfs2_xattr_acl_get()
531 return error; in gfs2_xattr_acl_get()
539 error = -ENOMEM; in gfs2_xattr_acl_get()
543 error = gfs2_ea_get_copy(ip, &el, data, len); in gfs2_xattr_acl_get()
544 if (error < 0) in gfs2_xattr_acl_get()
550 return error; in gfs2_xattr_acl_get()
561 * Returns: actual size of data on success, -errno on error
568 int error; in __gfs2_xattr_get() local
575 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_get()
576 if (error) in __gfs2_xattr_get()
577 return error; in __gfs2_xattr_get()
581 error = gfs2_ea_get_copy(ip, &el, buffer, size); in __gfs2_xattr_get()
583 error = GFS2_EA_DATA_LEN(el.el_ea); in __gfs2_xattr_get()
586 return error; in __gfs2_xattr_get()
626 int error; in ea_alloc_blk() local
628 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_alloc_blk()
629 if (error) in ea_alloc_blk()
630 return error; in ea_alloc_blk()
664 int error; in ea_write() local
690 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_write()
691 if (error) in ea_write()
692 return error; in ea_write()
728 int error; in ea_alloc_skeleton() local
730 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_alloc_skeleton()
731 if (error) in ea_alloc_skeleton()
732 return error; in ea_alloc_skeleton()
734 error = gfs2_quota_lock_check(ip, &ap); in ea_alloc_skeleton()
735 if (error) in ea_alloc_skeleton()
736 return error; in ea_alloc_skeleton()
738 error = gfs2_inplace_reserve(ip, &ap); in ea_alloc_skeleton()
739 if (error) in ea_alloc_skeleton()
742 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), in ea_alloc_skeleton()
745 if (error) in ea_alloc_skeleton()
748 error = skeleton_call(ip, er, private); in ea_alloc_skeleton()
749 if (error) in ea_alloc_skeleton()
761 return error; in ea_alloc_skeleton()
768 int error; in ea_init_i() local
770 error = ea_alloc_blk(ip, &bh); in ea_init_i()
771 if (error) in ea_init_i()
772 return error; in ea_init_i()
775 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); in ea_init_i()
779 return error; in ea_init_i()
864 int error; in ea_set_simple_noalloc() local
866 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + 2 * RES_EATTR, 0); in ea_set_simple_noalloc()
867 if (error) in ea_set_simple_noalloc()
868 return error; in ea_set_simple_noalloc()
884 return error; in ea_set_simple_noalloc()
892 int error; in ea_set_simple_alloc() local
899 error = ea_write(ip, ea, er); in ea_set_simple_alloc()
900 if (error) in ea_set_simple_alloc()
901 return error; in ea_set_simple_alloc()
916 int error; in ea_set_simple() local
925 error = ea_remove_unstuffed(ip, bh, ea, prev, 1); in ea_set_simple()
926 if (error) in ea_set_simple()
927 return error; in ea_set_simple()
936 error = ea_set_simple_noalloc(ip, bh, ea, es); in ea_set_simple()
937 if (error) in ea_set_simple()
938 return error; in ea_set_simple()
947 error = ea_alloc_skeleton(ip, es->es_er, blks, in ea_set_simple()
949 if (error) in ea_set_simple()
950 return error; in ea_set_simple()
962 int error; in ea_set_block() local
968 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, in ea_set_block()
970 if (error) in ea_set_block()
971 return error; in ea_set_block()
974 error = -EIO; in ea_set_block()
986 error = -ENOSPC; in ea_set_block()
994 error = gfs2_alloc_blocks(ip, &blk, &n, 0, NULL); in ea_set_block()
995 if (error) in ea_set_block()
996 return error; in ea_set_block()
1012 error = ea_alloc_blk(ip, &newbh); in ea_set_block()
1013 if (error) in ea_set_block()
1017 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); in ea_set_block()
1019 if (error) in ea_set_block()
1027 return error; in ea_set_block()
1036 int error; in ea_set_i() local
1048 error = ea_foreach(ip, ea_set_simple, &es); in ea_set_i()
1049 if (error > 0) in ea_set_i()
1051 if (error) in ea_set_i()
1052 return error; in ea_set_i()
1078 int error; in ea_remove_stuffed() local
1080 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + RES_EATTR, 0); in ea_remove_stuffed()
1081 if (error) in ea_remove_stuffed()
1082 return error; in ea_remove_stuffed()
1103 return error; in ea_remove_stuffed()
1122 int error; in gfs2_xattr_remove() local
1127 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_remove()
1128 if (error) in gfs2_xattr_remove()
1129 return error; in gfs2_xattr_remove()
1134 error = ea_remove_stuffed(ip, &el); in gfs2_xattr_remove()
1136 error = ea_remove_unstuffed(ip, el.el_bh, el.el_ea, el.el_prev, 0); in gfs2_xattr_remove()
1140 return error; in gfs2_xattr_remove()
1164 int error; in __gfs2_xattr_set() local
1172 error = gfs2_xattr_remove(ip, type, name); in __gfs2_xattr_set()
1173 if (error == -ENODATA && !(flags & XATTR_REPLACE)) in __gfs2_xattr_set()
1174 error = 0; in __gfs2_xattr_set()
1175 return error; in __gfs2_xattr_set()
1187 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_set()
1188 if (error) in __gfs2_xattr_set()
1189 return error; in __gfs2_xattr_set()
1197 error = -EEXIST; in __gfs2_xattr_set()
1200 error = ea_set_i(ip, type, name, value, size, &el); in __gfs2_xattr_set()
1201 if (!error && unstuffed) in __gfs2_xattr_set()
1206 return error; in __gfs2_xattr_set()
1209 error = -ENODATA; in __gfs2_xattr_set()
1211 error = ea_set_i(ip, type, name, value, size, NULL); in __gfs2_xattr_set()
1213 return error; in __gfs2_xattr_set()
1262 int error; in ea_dealloc_indirect() local
1264 error = gfs2_rindex_update(sdp); in ea_dealloc_indirect()
1265 if (error) in ea_dealloc_indirect()
1266 return error; in ea_dealloc_indirect()
1270 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &indbh); in ea_dealloc_indirect()
1271 if (error) in ea_dealloc_indirect()
1272 return error; in ea_dealloc_indirect()
1275 error = -EIO; in ea_dealloc_indirect()
1311 error = gfs2_glock_nq_m(rlist.rl_rgrps, rlist.rl_ghs); in ea_dealloc_indirect()
1312 if (error) in ea_dealloc_indirect()
1315 error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + RES_INDIRECT + in ea_dealloc_indirect()
1317 if (error) in ea_dealloc_indirect()
1352 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_indirect()
1353 if (!error) { in ea_dealloc_indirect()
1367 return error; in ea_dealloc_indirect()
1376 int error; in ea_dealloc_block() local
1378 error = gfs2_rindex_update(sdp); in ea_dealloc_block()
1379 if (error) in ea_dealloc_block()
1380 return error; in ea_dealloc_block()
1388 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1389 if (error) in ea_dealloc_block()
1390 return error; in ea_dealloc_block()
1392 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_DINODE + RES_STATFS + in ea_dealloc_block()
1394 if (error) in ea_dealloc_block()
1402 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_block()
1403 if (!error) { in ea_dealloc_block()
1413 return error; in ea_dealloc_block()
1425 int error; in gfs2_ea_dealloc() local
1427 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in gfs2_ea_dealloc()
1428 if (error) in gfs2_ea_dealloc()
1429 return error; in gfs2_ea_dealloc()
1431 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in gfs2_ea_dealloc()
1432 if (error) in gfs2_ea_dealloc()
1433 return error; in gfs2_ea_dealloc()
1435 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); in gfs2_ea_dealloc()
1436 if (error) in gfs2_ea_dealloc()
1440 error = ea_dealloc_indirect(ip); in gfs2_ea_dealloc()
1441 if (error) in gfs2_ea_dealloc()
1445 error = ea_dealloc_block(ip); in gfs2_ea_dealloc()
1449 return error; in gfs2_ea_dealloc()