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()
591 int error; in gfs2_xattr_get() local
598 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_get()
599 if (error) in gfs2_xattr_get()
600 return error; in gfs2_xattr_get()
604 error = gfs2_ea_get_copy(ip, &el, buffer, size); in gfs2_xattr_get()
606 error = GFS2_EA_DATA_LEN(el.el_ea); in gfs2_xattr_get()
609 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()
729 int error; in ea_alloc_skeleton() local
731 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_alloc_skeleton()
732 if (error) in ea_alloc_skeleton()
733 return error; in ea_alloc_skeleton()
735 error = gfs2_quota_lock_check(ip, &ap); in ea_alloc_skeleton()
736 if (error) in ea_alloc_skeleton()
737 return error; in ea_alloc_skeleton()
739 error = gfs2_inplace_reserve(ip, &ap); in ea_alloc_skeleton()
740 if (error) in ea_alloc_skeleton()
743 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), in ea_alloc_skeleton()
746 if (error) in ea_alloc_skeleton()
749 error = skeleton_call(ip, er, private); in ea_alloc_skeleton()
750 if (error) in ea_alloc_skeleton()
753 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_alloc_skeleton()
754 if (!error) { in ea_alloc_skeleton()
767 return error; in ea_alloc_skeleton()
774 int error; in ea_init_i() local
776 error = ea_alloc_blk(ip, &bh); in ea_init_i()
777 if (error) in ea_init_i()
778 return error; in ea_init_i()
781 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); in ea_init_i()
785 return error; in ea_init_i()
871 int error; in ea_set_simple_noalloc() local
873 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + 2 * RES_EATTR, 0); in ea_set_simple_noalloc()
874 if (error) in ea_set_simple_noalloc()
875 return error; in ea_set_simple_noalloc()
887 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_set_simple_noalloc()
888 if (error) in ea_set_simple_noalloc()
896 return error; in ea_set_simple_noalloc()
904 int error; in ea_set_simple_alloc() local
911 error = ea_write(ip, ea, er); in ea_set_simple_alloc()
912 if (error) in ea_set_simple_alloc()
913 return error; in ea_set_simple_alloc()
928 int error; in ea_set_simple() local
937 error = ea_remove_unstuffed(ip, bh, ea, prev, 1); in ea_set_simple()
938 if (error) in ea_set_simple()
939 return error; in ea_set_simple()
948 error = ea_set_simple_noalloc(ip, bh, ea, es); in ea_set_simple()
949 if (error) in ea_set_simple()
950 return error; in ea_set_simple()
959 error = ea_alloc_skeleton(ip, es->es_er, blks, in ea_set_simple()
961 if (error) in ea_set_simple()
962 return error; in ea_set_simple()
974 int error; in ea_set_block() local
980 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, in ea_set_block()
982 if (error) in ea_set_block()
983 return error; in ea_set_block()
986 error = -EIO; in ea_set_block()
998 error = -ENOSPC; in ea_set_block()
1006 error = gfs2_alloc_blocks(ip, &blk, &n, 0, NULL); in ea_set_block()
1007 if (error) in ea_set_block()
1008 return error; in ea_set_block()
1024 error = ea_alloc_blk(ip, &newbh); in ea_set_block()
1025 if (error) in ea_set_block()
1029 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); in ea_set_block()
1031 if (error) in ea_set_block()
1039 return error; in ea_set_block()
1048 int error; in ea_set_i() local
1060 error = ea_foreach(ip, ea_set_simple, &es); in ea_set_i()
1061 if (error > 0) in ea_set_i()
1063 if (error) in ea_set_i()
1064 return error; in ea_set_i()
1091 int error; in ea_remove_stuffed() local
1093 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + RES_EATTR, 0); in ea_remove_stuffed()
1094 if (error) in ea_remove_stuffed()
1095 return error; in ea_remove_stuffed()
1111 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_remove_stuffed()
1112 if (!error) { in ea_remove_stuffed()
1121 return error; in ea_remove_stuffed()
1140 int error; in gfs2_xattr_remove() local
1145 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_remove()
1146 if (error) in gfs2_xattr_remove()
1147 return error; in gfs2_xattr_remove()
1152 error = ea_remove_stuffed(ip, &el); in gfs2_xattr_remove()
1154 error = ea_remove_unstuffed(ip, el.el_bh, el.el_ea, el.el_prev, 0); in gfs2_xattr_remove()
1158 return error; in gfs2_xattr_remove()
1182 int error; in __gfs2_xattr_set() local
1201 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_set()
1202 if (error) in __gfs2_xattr_set()
1203 return error; in __gfs2_xattr_set()
1211 error = -EEXIST; in __gfs2_xattr_set()
1214 error = ea_set_i(ip, type, name, value, size, &el); in __gfs2_xattr_set()
1215 if (!error && unstuffed) in __gfs2_xattr_set()
1220 return error; in __gfs2_xattr_set()
1223 error = -ENODATA; in __gfs2_xattr_set()
1225 error = ea_set_i(ip, type, name, value, size, NULL); in __gfs2_xattr_set()
1227 return error; in __gfs2_xattr_set()
1261 int error; in gfs2_xattr_acl_chmod() local
1263 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, GFS2_POSIX_ACL_ACCESS, &el); in gfs2_xattr_acl_chmod()
1264 if (error) in gfs2_xattr_acl_chmod()
1265 return error; in gfs2_xattr_acl_chmod()
1268 error = gfs2_trans_begin(sdp, RES_DINODE + RES_EATTR, 0); in gfs2_xattr_acl_chmod()
1269 if (error == 0) { in gfs2_xattr_acl_chmod()
1275 error = ea_acl_chmod_unstuffed(ip, el.el_ea, data); in gfs2_xattr_acl_chmod()
1279 if (error) in gfs2_xattr_acl_chmod()
1280 return error; in gfs2_xattr_acl_chmod()
1282 error = gfs2_setattr_simple(inode, attr); in gfs2_xattr_acl_chmod()
1284 return error; in gfs2_xattr_acl_chmod()
1298 int error; in ea_dealloc_indirect() local
1300 error = gfs2_rindex_update(sdp); in ea_dealloc_indirect()
1301 if (error) in ea_dealloc_indirect()
1302 return error; in ea_dealloc_indirect()
1306 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &indbh); in ea_dealloc_indirect()
1307 if (error) in ea_dealloc_indirect()
1308 return error; in ea_dealloc_indirect()
1311 error = -EIO; in ea_dealloc_indirect()
1348 error = gfs2_glock_nq_m(rlist.rl_rgrps, rlist.rl_ghs); in ea_dealloc_indirect()
1349 if (error) in ea_dealloc_indirect()
1352 error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + RES_INDIRECT + in ea_dealloc_indirect()
1354 if (error) in ea_dealloc_indirect()
1387 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_indirect()
1388 if (!error) { in ea_dealloc_indirect()
1402 return error; in ea_dealloc_indirect()
1411 int error; in ea_dealloc_block() local
1413 error = gfs2_rindex_update(sdp); in ea_dealloc_block()
1414 if (error) in ea_dealloc_block()
1415 return error; in ea_dealloc_block()
1423 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1424 if (error) in ea_dealloc_block()
1425 return error; in ea_dealloc_block()
1427 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_DINODE + RES_STATFS + in ea_dealloc_block()
1429 if (error) in ea_dealloc_block()
1437 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_block()
1438 if (!error) { in ea_dealloc_block()
1448 return error; in ea_dealloc_block()
1460 int error; in gfs2_ea_dealloc() local
1462 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in gfs2_ea_dealloc()
1463 if (error) in gfs2_ea_dealloc()
1464 return error; in gfs2_ea_dealloc()
1466 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in gfs2_ea_dealloc()
1467 if (error) in gfs2_ea_dealloc()
1468 return error; in gfs2_ea_dealloc()
1470 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); in gfs2_ea_dealloc()
1471 if (error) in gfs2_ea_dealloc()
1475 error = ea_dealloc_indirect(ip); in gfs2_ea_dealloc()
1476 if (error) in gfs2_ea_dealloc()
1480 error = ea_dealloc_block(ip); in gfs2_ea_dealloc()
1484 return error; in gfs2_ea_dealloc()