Lines Matching full:error
93 int error = 0; in ea_foreach_i() local
112 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i()
113 if (error) in ea_foreach_i()
114 return error; in ea_foreach_i()
126 return error; in ea_foreach_i()
133 int error; in ea_foreach() local
135 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &bh); in ea_foreach()
136 if (error) in ea_foreach()
137 return error; in ea_foreach()
140 error = ea_foreach_i(ip, bh, ea_call, data); in ea_foreach()
145 error = -EIO; in ea_foreach()
159 error = gfs2_meta_read(ip->i_gl, bn, DIO_WAIT, 0, &eabh); in ea_foreach()
160 if (error) in ea_foreach()
162 error = ea_foreach_i(ip, eabh, ea_call, data); in ea_foreach()
164 if (error) in ea_foreach()
169 return error; in ea_foreach()
207 int error; in gfs2_ea_find() local
216 error = ea_foreach(ip, ea_find_i, &ef); in gfs2_ea_find()
217 if (error > 0) in gfs2_ea_find()
220 return error; in gfs2_ea_find()
247 int error; in ea_dealloc_unstuffed() local
249 error = gfs2_rindex_update(sdp); in ea_dealloc_unstuffed()
250 if (error) in ea_dealloc_unstuffed()
251 return error; in ea_dealloc_unstuffed()
272 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, in ea_dealloc_unstuffed()
274 if (error) in ea_dealloc_unstuffed()
275 return error; in ea_dealloc_unstuffed()
277 error = gfs2_trans_begin(sdp, rgd->rd_length + RES_DINODE + in ea_dealloc_unstuffed()
279 if (error) in ea_dealloc_unstuffed()
325 return error; in ea_dealloc_unstuffed()
332 int error; in ea_remove_unstuffed() local
334 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_remove_unstuffed()
335 if (error) in ea_remove_unstuffed()
336 return error; in ea_remove_unstuffed()
338 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in ea_remove_unstuffed()
339 if (error) in ea_remove_unstuffed()
342 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL); in ea_remove_unstuffed()
346 return error; in ea_remove_unstuffed()
413 * Returns: actual size of data on success, -errno on error
421 int error; in gfs2_listxattr() local
429 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); in gfs2_listxattr()
430 if (error) in gfs2_listxattr()
431 return error; in gfs2_listxattr()
436 error = ea_foreach(ip, ea_list_i, &ei); in gfs2_listxattr()
437 if (!error) in gfs2_listxattr()
438 error = ei.ei_size; in gfs2_listxattr()
443 return error; in gfs2_listxattr()
466 int error = 0; in gfs2_iter_unstuffed() local
475 error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*dataptrs), 0, 0, in gfs2_iter_unstuffed()
477 if (error) { in gfs2_iter_unstuffed()
486 error = gfs2_meta_wait(sdp, bh[x]); in gfs2_iter_unstuffed()
487 if (error) { in gfs2_iter_unstuffed()
495 error = -EIO; in gfs2_iter_unstuffed()
519 return error; in gfs2_iter_unstuffed()
543 int error; in gfs2_xattr_acl_get() local
547 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, name, &el); in gfs2_xattr_acl_get()
548 if (error) in gfs2_xattr_acl_get()
549 return error; in gfs2_xattr_acl_get()
557 error = -ENOMEM; in gfs2_xattr_acl_get()
561 error = gfs2_ea_get_copy(ip, &el, data, len); in gfs2_xattr_acl_get()
562 if (error < 0) in gfs2_xattr_acl_get()
568 return error; in gfs2_xattr_acl_get()
579 * Returns: actual size of data on success, -errno on error
586 int error; in __gfs2_xattr_get() local
593 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_get()
594 if (error) in __gfs2_xattr_get()
595 return error; in __gfs2_xattr_get()
599 error = gfs2_ea_get_copy(ip, &el, buffer, size); in __gfs2_xattr_get()
601 error = GFS2_EA_DATA_LEN(el.el_ea); in __gfs2_xattr_get()
604 return error; in __gfs2_xattr_get()
644 int error; in ea_alloc_blk() local
646 error = gfs2_alloc_blocks(ip, &block, &n, 0); in ea_alloc_blk()
647 if (error) in ea_alloc_blk()
648 return error; in ea_alloc_blk()
682 int error; in ea_write() local
708 error = gfs2_alloc_blocks(ip, &block, &n, 0); in ea_write()
709 if (error) in ea_write()
710 return error; in ea_write()
746 int error; in ea_alloc_skeleton() local
748 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_alloc_skeleton()
749 if (error) in ea_alloc_skeleton()
750 return error; in ea_alloc_skeleton()
752 error = gfs2_quota_lock_check(ip, &ap); in ea_alloc_skeleton()
753 if (error) in ea_alloc_skeleton()
754 return error; in ea_alloc_skeleton()
756 error = gfs2_inplace_reserve(ip, &ap); in ea_alloc_skeleton()
757 if (error) in ea_alloc_skeleton()
760 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), in ea_alloc_skeleton()
763 if (error) in ea_alloc_skeleton()
766 error = skeleton_call(ip, er, private); in ea_alloc_skeleton()
767 if (error) in ea_alloc_skeleton()
779 return error; in ea_alloc_skeleton()
786 int error; in ea_init_i() local
788 error = ea_alloc_blk(ip, &bh); in ea_init_i()
789 if (error) in ea_init_i()
790 return error; in ea_init_i()
793 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); in ea_init_i()
797 return error; in ea_init_i()
879 int error; in ea_set_simple_noalloc() local
881 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + 2 * RES_EATTR, 0); in ea_set_simple_noalloc()
882 if (error) in ea_set_simple_noalloc()
883 return error; in ea_set_simple_noalloc()
899 return error; in ea_set_simple_noalloc()
907 int error; in ea_set_simple_alloc() local
914 error = ea_write(ip, ea, er); in ea_set_simple_alloc()
915 if (error) in ea_set_simple_alloc()
916 return error; in ea_set_simple_alloc()
931 int error; in ea_set_simple() local
940 error = ea_remove_unstuffed(ip, bh, ea, prev, 1); in ea_set_simple()
941 if (error) in ea_set_simple()
942 return error; in ea_set_simple()
951 error = ea_set_simple_noalloc(ip, bh, ea, es); in ea_set_simple()
952 if (error) in ea_set_simple()
953 return error; in ea_set_simple()
962 error = ea_alloc_skeleton(ip, es->es_er, blks, in ea_set_simple()
964 if (error) in ea_set_simple()
965 return error; in ea_set_simple()
977 int error; in ea_set_block() local
983 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, in ea_set_block()
985 if (error) in ea_set_block()
986 return error; in ea_set_block()
989 error = -EIO; in ea_set_block()
1001 error = -ENOSPC; in ea_set_block()
1009 error = gfs2_alloc_blocks(ip, &blk, &n, 0); in ea_set_block()
1010 if (error) in ea_set_block()
1011 return error; in ea_set_block()
1027 error = ea_alloc_blk(ip, &newbh); in ea_set_block()
1028 if (error) in ea_set_block()
1032 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); in ea_set_block()
1034 if (error) in ea_set_block()
1042 return error; in ea_set_block()
1051 int error; in ea_set_i() local
1063 error = ea_foreach(ip, ea_set_simple, &es); in ea_set_i()
1064 if (error > 0) in ea_set_i()
1066 if (error) in ea_set_i()
1067 return error; in ea_set_i()
1093 int error; in ea_remove_stuffed() local
1095 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + RES_EATTR, 0); in ea_remove_stuffed()
1096 if (error) in ea_remove_stuffed()
1097 return error; in ea_remove_stuffed()
1118 return error; in ea_remove_stuffed()
1137 int error; in gfs2_xattr_remove() local
1142 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_remove()
1143 if (error) in gfs2_xattr_remove()
1144 return error; in gfs2_xattr_remove()
1149 error = ea_remove_stuffed(ip, &el); in gfs2_xattr_remove()
1151 error = ea_remove_unstuffed(ip, el.el_bh, el.el_ea, el.el_prev, 0); in gfs2_xattr_remove()
1155 return error; in gfs2_xattr_remove()
1179 int error; in __gfs2_xattr_set() local
1187 error = gfs2_xattr_remove(ip, type, name); in __gfs2_xattr_set()
1188 if (error == -ENODATA && !(flags & XATTR_REPLACE)) in __gfs2_xattr_set()
1189 error = 0; in __gfs2_xattr_set()
1190 return error; in __gfs2_xattr_set()
1202 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_set()
1203 if (error) in __gfs2_xattr_set()
1204 return error; in __gfs2_xattr_set()
1212 error = -EEXIST; in __gfs2_xattr_set()
1215 error = ea_set_i(ip, type, name, value, size, &el); in __gfs2_xattr_set()
1216 if (!error && unstuffed) in __gfs2_xattr_set()
1221 return error; in __gfs2_xattr_set()
1224 error = -ENODATA; in __gfs2_xattr_set()
1226 error = ea_set_i(ip, type, name, value, size, NULL); in __gfs2_xattr_set()
1228 return error; in __gfs2_xattr_set()
1278 int error; in ea_dealloc_indirect() local
1280 error = gfs2_rindex_update(sdp); in ea_dealloc_indirect()
1281 if (error) in ea_dealloc_indirect()
1282 return error; in ea_dealloc_indirect()
1286 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &indbh); in ea_dealloc_indirect()
1287 if (error) in ea_dealloc_indirect()
1288 return error; in ea_dealloc_indirect()
1291 error = -EIO; in ea_dealloc_indirect()
1327 error = gfs2_glock_nq_m(rlist.rl_rgrps, rlist.rl_ghs); in ea_dealloc_indirect()
1328 if (error) in ea_dealloc_indirect()
1331 error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + RES_INDIRECT + in ea_dealloc_indirect()
1333 if (error) in ea_dealloc_indirect()
1368 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_indirect()
1369 if (!error) { in ea_dealloc_indirect()
1383 return error; in ea_dealloc_indirect()
1392 int error; in ea_dealloc_block() local
1394 error = gfs2_rindex_update(sdp); in ea_dealloc_block()
1395 if (error) in ea_dealloc_block()
1396 return error; in ea_dealloc_block()
1404 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, in ea_dealloc_block()
1406 if (error) in ea_dealloc_block()
1407 return error; in ea_dealloc_block()
1409 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_DINODE + RES_STATFS + in ea_dealloc_block()
1411 if (error) in ea_dealloc_block()
1420 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_block()
1421 if (!error) { in ea_dealloc_block()
1432 return error; in ea_dealloc_block()
1444 int error; in gfs2_ea_dealloc() local
1446 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in gfs2_ea_dealloc()
1447 if (error) in gfs2_ea_dealloc()
1448 return error; in gfs2_ea_dealloc()
1450 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in gfs2_ea_dealloc()
1451 if (error) in gfs2_ea_dealloc()
1452 return error; in gfs2_ea_dealloc()
1455 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); in gfs2_ea_dealloc()
1456 if (error) in gfs2_ea_dealloc()
1460 error = ea_dealloc_indirect(ip); in gfs2_ea_dealloc()
1461 if (error) in gfs2_ea_dealloc()
1466 error = ea_dealloc_block(ip); in gfs2_ea_dealloc()
1470 return error; in gfs2_ea_dealloc()