Lines Matching refs:error
83 int error = 0; in ea_foreach_i() local
97 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i()
98 if (error) in ea_foreach_i()
99 return error; in ea_foreach_i()
109 return error; in ea_foreach_i()
120 int error; in ea_foreach() local
122 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &bh); in ea_foreach()
123 if (error) in ea_foreach()
124 return error; in ea_foreach()
127 error = ea_foreach_i(ip, bh, ea_call, data); in ea_foreach()
132 error = -EIO; in ea_foreach()
146 error = gfs2_meta_read(ip->i_gl, bn, DIO_WAIT, &eabh); in ea_foreach()
147 if (error) in ea_foreach()
149 error = ea_foreach_i(ip, eabh, ea_call, data); in ea_foreach()
151 if (error) in ea_foreach()
156 return error; in ea_foreach()
194 int error; in gfs2_ea_find() local
203 error = ea_foreach(ip, ea_find_i, &ef); in gfs2_ea_find()
204 if (error > 0) in gfs2_ea_find()
207 return error; in gfs2_ea_find()
240 int error; in ea_dealloc_unstuffed() local
242 error = gfs2_rindex_update(sdp); in ea_dealloc_unstuffed()
243 if (error) in ea_dealloc_unstuffed()
244 return error; in ea_dealloc_unstuffed()
265 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &rg_gh); in ea_dealloc_unstuffed()
266 if (error) in ea_dealloc_unstuffed()
267 return error; in ea_dealloc_unstuffed()
269 error = gfs2_trans_begin(sdp, rgd->rd_length + RES_DINODE + in ea_dealloc_unstuffed()
271 if (error) in ea_dealloc_unstuffed()
310 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_unstuffed()
311 if (!error) { in ea_dealloc_unstuffed()
322 return error; in ea_dealloc_unstuffed()
329 int error; in ea_remove_unstuffed() local
331 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_remove_unstuffed()
332 if (error) in ea_remove_unstuffed()
333 return error; in ea_remove_unstuffed()
335 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in ea_remove_unstuffed()
336 if (error) in ea_remove_unstuffed()
339 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL); in ea_remove_unstuffed()
343 return error; in ea_remove_unstuffed()
426 int error; in gfs2_listxattr() local
434 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); in gfs2_listxattr()
435 if (error) in gfs2_listxattr()
436 return error; in gfs2_listxattr()
441 error = ea_foreach(ip, ea_list_i, &ei); in gfs2_listxattr()
442 if (!error) in gfs2_listxattr()
443 error = ei.ei_size; in gfs2_listxattr()
448 return error; in gfs2_listxattr()
471 int error = 0; in gfs2_iter_unstuffed() local
480 error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*dataptrs), 0, in gfs2_iter_unstuffed()
482 if (error) { in gfs2_iter_unstuffed()
491 error = gfs2_meta_wait(sdp, bh[x]); in gfs2_iter_unstuffed()
492 if (error) { in gfs2_iter_unstuffed()
500 error = -EIO; in gfs2_iter_unstuffed()
524 return error; in gfs2_iter_unstuffed()
548 int error; in gfs2_xattr_acl_get() local
552 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, name, &el); in gfs2_xattr_acl_get()
553 if (error) in gfs2_xattr_acl_get()
554 return error; in gfs2_xattr_acl_get()
562 error = -ENOMEM; in gfs2_xattr_acl_get()
566 error = gfs2_ea_get_copy(ip, &el, data, len); in gfs2_xattr_acl_get()
567 if (error < 0) in gfs2_xattr_acl_get()
573 return error; in gfs2_xattr_acl_get()
593 int error; in gfs2_xattr_get() local
600 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_get()
601 if (error) in gfs2_xattr_get()
602 return error; in gfs2_xattr_get()
606 error = gfs2_ea_get_copy(ip, &el, buffer, size); in gfs2_xattr_get()
608 error = GFS2_EA_DATA_LEN(el.el_ea); in gfs2_xattr_get()
611 return error; in gfs2_xattr_get()
628 int error; in ea_alloc_blk() local
630 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_alloc_blk()
631 if (error) in ea_alloc_blk()
632 return error; in ea_alloc_blk()
666 int error; in ea_write() local
692 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_write()
693 if (error) in ea_write()
694 return error; in ea_write()
731 int error; in ea_alloc_skeleton() local
733 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_alloc_skeleton()
734 if (error) in ea_alloc_skeleton()
735 return error; in ea_alloc_skeleton()
737 error = gfs2_quota_lock_check(ip, &ap); in ea_alloc_skeleton()
738 if (error) in ea_alloc_skeleton()
739 return error; in ea_alloc_skeleton()
741 error = gfs2_inplace_reserve(ip, &ap); in ea_alloc_skeleton()
742 if (error) in ea_alloc_skeleton()
745 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), in ea_alloc_skeleton()
748 if (error) in ea_alloc_skeleton()
751 error = skeleton_call(ip, er, private); in ea_alloc_skeleton()
752 if (error) in ea_alloc_skeleton()
755 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_alloc_skeleton()
756 if (!error) { in ea_alloc_skeleton()
769 return error; in ea_alloc_skeleton()
776 int error; in ea_init_i() local
778 error = ea_alloc_blk(ip, &bh); in ea_init_i()
779 if (error) in ea_init_i()
780 return error; in ea_init_i()
783 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); in ea_init_i()
787 return error; in ea_init_i()
873 int error; in ea_set_simple_noalloc() local
875 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + 2 * RES_EATTR, 0); in ea_set_simple_noalloc()
876 if (error) in ea_set_simple_noalloc()
877 return error; in ea_set_simple_noalloc()
889 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_set_simple_noalloc()
890 if (error) in ea_set_simple_noalloc()
898 return error; in ea_set_simple_noalloc()
906 int error; in ea_set_simple_alloc() local
913 error = ea_write(ip, ea, er); in ea_set_simple_alloc()
914 if (error) in ea_set_simple_alloc()
915 return error; in ea_set_simple_alloc()
930 int error; in ea_set_simple() local
939 error = ea_remove_unstuffed(ip, bh, ea, prev, 1); in ea_set_simple()
940 if (error) in ea_set_simple()
941 return error; in ea_set_simple()
950 error = ea_set_simple_noalloc(ip, bh, ea, es); in ea_set_simple()
951 if (error) in ea_set_simple()
952 return error; in ea_set_simple()
961 error = ea_alloc_skeleton(ip, es->es_er, blks, in ea_set_simple()
963 if (error) in ea_set_simple()
964 return error; in ea_set_simple()
976 int error; in ea_set_block() local
982 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, in ea_set_block()
984 if (error) in ea_set_block()
985 return error; in ea_set_block()
988 error = -EIO; in ea_set_block()
1000 error = -ENOSPC; in ea_set_block()
1008 error = gfs2_alloc_blocks(ip, &blk, &n, 0, NULL); in ea_set_block()
1009 if (error) in ea_set_block()
1010 return error; in ea_set_block()
1026 error = ea_alloc_blk(ip, &newbh); in ea_set_block()
1027 if (error) in ea_set_block()
1031 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); in ea_set_block()
1033 if (error) in ea_set_block()
1041 return error; in ea_set_block()
1050 int error; in ea_set_i() local
1062 error = ea_foreach(ip, ea_set_simple, &es); in ea_set_i()
1063 if (error > 0) in ea_set_i()
1065 if (error) in ea_set_i()
1066 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()
1113 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_remove_stuffed()
1114 if (!error) { in ea_remove_stuffed()
1123 return error; in ea_remove_stuffed()
1142 int error; in gfs2_xattr_remove() local
1147 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_remove()
1148 if (error) in gfs2_xattr_remove()
1149 return error; in gfs2_xattr_remove()
1154 error = ea_remove_stuffed(ip, &el); in gfs2_xattr_remove()
1156 error = ea_remove_unstuffed(ip, el.el_bh, el.el_ea, el.el_prev, 0); in gfs2_xattr_remove()
1160 return error; in gfs2_xattr_remove()
1184 int error; in __gfs2_xattr_set() local
1203 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_set()
1204 if (error) in __gfs2_xattr_set()
1205 return error; in __gfs2_xattr_set()
1213 error = -EEXIST; in __gfs2_xattr_set()
1216 error = ea_set_i(ip, type, name, value, size, &el); in __gfs2_xattr_set()
1217 if (!error && unstuffed) in __gfs2_xattr_set()
1222 return error; in __gfs2_xattr_set()
1225 error = -ENODATA; in __gfs2_xattr_set()
1227 error = ea_set_i(ip, type, name, value, size, NULL); in __gfs2_xattr_set()
1229 return error; in __gfs2_xattr_set()
1264 int error; in gfs2_xattr_acl_chmod() local
1266 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, GFS2_POSIX_ACL_ACCESS, &el); in gfs2_xattr_acl_chmod()
1267 if (error) in gfs2_xattr_acl_chmod()
1268 return error; in gfs2_xattr_acl_chmod()
1271 error = gfs2_trans_begin(sdp, RES_DINODE + RES_EATTR, 0); in gfs2_xattr_acl_chmod()
1272 if (error == 0) { in gfs2_xattr_acl_chmod()
1278 error = ea_acl_chmod_unstuffed(ip, el.el_ea, data); in gfs2_xattr_acl_chmod()
1282 if (error) in gfs2_xattr_acl_chmod()
1283 return error; in gfs2_xattr_acl_chmod()
1285 error = gfs2_setattr_simple(inode, attr); in gfs2_xattr_acl_chmod()
1287 return error; in gfs2_xattr_acl_chmod()
1301 int error; in ea_dealloc_indirect() local
1303 error = gfs2_rindex_update(sdp); in ea_dealloc_indirect()
1304 if (error) in ea_dealloc_indirect()
1305 return error; in ea_dealloc_indirect()
1309 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &indbh); in ea_dealloc_indirect()
1310 if (error) in ea_dealloc_indirect()
1311 return error; in ea_dealloc_indirect()
1314 error = -EIO; in ea_dealloc_indirect()
1351 error = gfs2_glock_nq_m(rlist.rl_rgrps, rlist.rl_ghs); in ea_dealloc_indirect()
1352 if (error) in ea_dealloc_indirect()
1355 error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + RES_INDIRECT + in ea_dealloc_indirect()
1357 if (error) in ea_dealloc_indirect()
1390 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_indirect()
1391 if (!error) { in ea_dealloc_indirect()
1405 return error; in ea_dealloc_indirect()
1414 int error; in ea_dealloc_block() local
1416 error = gfs2_rindex_update(sdp); in ea_dealloc_block()
1417 if (error) in ea_dealloc_block()
1418 return error; in ea_dealloc_block()
1426 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1427 if (error) in ea_dealloc_block()
1428 return error; in ea_dealloc_block()
1430 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_DINODE + RES_STATFS + in ea_dealloc_block()
1432 if (error) in ea_dealloc_block()
1440 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_block()
1441 if (!error) { in ea_dealloc_block()
1451 return error; in ea_dealloc_block()
1463 int error; in gfs2_ea_dealloc() local
1465 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in gfs2_ea_dealloc()
1466 if (error) in gfs2_ea_dealloc()
1467 return error; in gfs2_ea_dealloc()
1469 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in gfs2_ea_dealloc()
1470 if (error) in gfs2_ea_dealloc()
1471 return error; in gfs2_ea_dealloc()
1473 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); in gfs2_ea_dealloc()
1474 if (error) in gfs2_ea_dealloc()
1478 error = ea_dealloc_indirect(ip); in gfs2_ea_dealloc()
1479 if (error) in gfs2_ea_dealloc()
1483 error = ea_dealloc_block(ip); in gfs2_ea_dealloc()
1487 return error; in gfs2_ea_dealloc()