Lines Matching full:error
93 int error = 0; in ea_foreach_i() local
106 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i()
107 if (error) in ea_foreach_i()
108 return error; in ea_foreach_i()
118 return error; in ea_foreach_i()
129 int error; in ea_foreach() local
131 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &bh); in ea_foreach()
132 if (error) in ea_foreach()
133 return error; in ea_foreach()
136 error = ea_foreach_i(ip, bh, ea_call, data); in ea_foreach()
141 error = -EIO; in ea_foreach()
155 error = gfs2_meta_read(ip->i_gl, bn, DIO_WAIT, 0, &eabh); in ea_foreach()
156 if (error) in ea_foreach()
158 error = ea_foreach_i(ip, eabh, ea_call, data); in ea_foreach()
160 if (error) in ea_foreach()
165 return error; in ea_foreach()
203 int error; in gfs2_ea_find() local
212 error = ea_foreach(ip, ea_find_i, &ef); in gfs2_ea_find()
213 if (error > 0) in gfs2_ea_find()
216 return error; in gfs2_ea_find()
243 int error; in ea_dealloc_unstuffed() local
245 error = gfs2_rindex_update(sdp); in ea_dealloc_unstuffed()
246 if (error) in ea_dealloc_unstuffed()
247 return error; in ea_dealloc_unstuffed()
268 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, in ea_dealloc_unstuffed()
270 if (error) in ea_dealloc_unstuffed()
271 return error; in ea_dealloc_unstuffed()
273 error = gfs2_trans_begin(sdp, rgd->rd_length + RES_DINODE + in ea_dealloc_unstuffed()
275 if (error) in ea_dealloc_unstuffed()
321 return error; in ea_dealloc_unstuffed()
328 int error; in ea_remove_unstuffed() local
330 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_remove_unstuffed()
331 if (error) in ea_remove_unstuffed()
332 return error; in ea_remove_unstuffed()
334 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in ea_remove_unstuffed()
335 if (error) in ea_remove_unstuffed()
338 error = ea_dealloc_unstuffed(ip, bh, ea, prev, (leave) ? &error : NULL); in ea_remove_unstuffed()
342 return error; in ea_remove_unstuffed()
409 * Returns: actual size of data on success, -errno on error
417 int error; in gfs2_listxattr() local
425 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); in gfs2_listxattr()
426 if (error) in gfs2_listxattr()
427 return error; in gfs2_listxattr()
432 error = ea_foreach(ip, ea_list_i, &ei); in gfs2_listxattr()
433 if (!error) in gfs2_listxattr()
434 error = ei.ei_size; in gfs2_listxattr()
439 return error; in gfs2_listxattr()
462 int error = 0; in gfs2_iter_unstuffed() local
471 error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*dataptrs), 0, 0, in gfs2_iter_unstuffed()
473 if (error) { in gfs2_iter_unstuffed()
482 error = gfs2_meta_wait(sdp, bh[x]); in gfs2_iter_unstuffed()
483 if (error) { in gfs2_iter_unstuffed()
491 error = -EIO; in gfs2_iter_unstuffed()
515 return error; in gfs2_iter_unstuffed()
539 int error; in gfs2_xattr_acl_get() local
543 error = gfs2_ea_find(ip, GFS2_EATYPE_SYS, name, &el); in gfs2_xattr_acl_get()
544 if (error) in gfs2_xattr_acl_get()
545 return error; in gfs2_xattr_acl_get()
553 error = -ENOMEM; in gfs2_xattr_acl_get()
557 error = gfs2_ea_get_copy(ip, &el, data, len); in gfs2_xattr_acl_get()
558 if (error < 0) in gfs2_xattr_acl_get()
564 return error; in gfs2_xattr_acl_get()
575 * Returns: actual size of data on success, -errno on error
582 int error; in __gfs2_xattr_get() local
589 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_get()
590 if (error) in __gfs2_xattr_get()
591 return error; in __gfs2_xattr_get()
595 error = gfs2_ea_get_copy(ip, &el, buffer, size); in __gfs2_xattr_get()
597 error = GFS2_EA_DATA_LEN(el.el_ea); in __gfs2_xattr_get()
600 return error; in __gfs2_xattr_get()
640 int error; in ea_alloc_blk() local
642 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_alloc_blk()
643 if (error) in ea_alloc_blk()
644 return error; in ea_alloc_blk()
678 int error; in ea_write() local
704 error = gfs2_alloc_blocks(ip, &block, &n, 0, NULL); in ea_write()
705 if (error) in ea_write()
706 return error; in ea_write()
742 int error; in ea_alloc_skeleton() local
744 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in ea_alloc_skeleton()
745 if (error) in ea_alloc_skeleton()
746 return error; in ea_alloc_skeleton()
748 error = gfs2_quota_lock_check(ip, &ap); in ea_alloc_skeleton()
749 if (error) in ea_alloc_skeleton()
750 return error; in ea_alloc_skeleton()
752 error = gfs2_inplace_reserve(ip, &ap); in ea_alloc_skeleton()
753 if (error) in ea_alloc_skeleton()
756 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), in ea_alloc_skeleton()
759 if (error) in ea_alloc_skeleton()
762 error = skeleton_call(ip, er, private); in ea_alloc_skeleton()
763 if (error) in ea_alloc_skeleton()
775 return error; in ea_alloc_skeleton()
782 int error; in ea_init_i() local
784 error = ea_alloc_blk(ip, &bh); in ea_init_i()
785 if (error) in ea_init_i()
786 return error; in ea_init_i()
789 error = ea_write(ip, GFS2_EA_BH2FIRST(bh), er); in ea_init_i()
793 return error; in ea_init_i()
875 int error; in ea_set_simple_noalloc() local
877 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + 2 * RES_EATTR, 0); in ea_set_simple_noalloc()
878 if (error) in ea_set_simple_noalloc()
879 return error; in ea_set_simple_noalloc()
895 return error; in ea_set_simple_noalloc()
903 int error; in ea_set_simple_alloc() local
910 error = ea_write(ip, ea, er); in ea_set_simple_alloc()
911 if (error) in ea_set_simple_alloc()
912 return error; in ea_set_simple_alloc()
927 int error; in ea_set_simple() local
936 error = ea_remove_unstuffed(ip, bh, ea, prev, 1); in ea_set_simple()
937 if (error) in ea_set_simple()
938 return error; in ea_set_simple()
947 error = ea_set_simple_noalloc(ip, bh, ea, es); in ea_set_simple()
948 if (error) in ea_set_simple()
949 return error; in ea_set_simple()
958 error = ea_alloc_skeleton(ip, es->es_er, blks, in ea_set_simple()
960 if (error) in ea_set_simple()
961 return error; in ea_set_simple()
973 int error; in ea_set_block() local
979 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, in ea_set_block()
981 if (error) in ea_set_block()
982 return error; in ea_set_block()
985 error = -EIO; in ea_set_block()
997 error = -ENOSPC; in ea_set_block()
1005 error = gfs2_alloc_blocks(ip, &blk, &n, 0, NULL); in ea_set_block()
1006 if (error) in ea_set_block()
1007 return error; in ea_set_block()
1023 error = ea_alloc_blk(ip, &newbh); in ea_set_block()
1024 if (error) in ea_set_block()
1028 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); in ea_set_block()
1030 if (error) in ea_set_block()
1038 return error; in ea_set_block()
1047 int error; in ea_set_i() local
1059 error = ea_foreach(ip, ea_set_simple, &es); in ea_set_i()
1060 if (error > 0) in ea_set_i()
1062 if (error) in ea_set_i()
1063 return error; in ea_set_i()
1089 int error; in ea_remove_stuffed() local
1091 error = gfs2_trans_begin(GFS2_SB(&ip->i_inode), RES_DINODE + RES_EATTR, 0); in ea_remove_stuffed()
1092 if (error) in ea_remove_stuffed()
1093 return error; in ea_remove_stuffed()
1114 return error; in ea_remove_stuffed()
1133 int error; in gfs2_xattr_remove() local
1138 error = gfs2_ea_find(ip, type, name, &el); in gfs2_xattr_remove()
1139 if (error) in gfs2_xattr_remove()
1140 return error; in gfs2_xattr_remove()
1145 error = ea_remove_stuffed(ip, &el); in gfs2_xattr_remove()
1147 error = ea_remove_unstuffed(ip, el.el_bh, el.el_ea, el.el_prev, 0); in gfs2_xattr_remove()
1151 return error; in gfs2_xattr_remove()
1175 int error; in __gfs2_xattr_set() local
1183 error = gfs2_xattr_remove(ip, type, name); in __gfs2_xattr_set()
1184 if (error == -ENODATA && !(flags & XATTR_REPLACE)) in __gfs2_xattr_set()
1185 error = 0; in __gfs2_xattr_set()
1186 return error; in __gfs2_xattr_set()
1198 error = gfs2_ea_find(ip, type, name, &el); in __gfs2_xattr_set()
1199 if (error) in __gfs2_xattr_set()
1200 return error; in __gfs2_xattr_set()
1208 error = -EEXIST; in __gfs2_xattr_set()
1211 error = ea_set_i(ip, type, name, value, size, &el); in __gfs2_xattr_set()
1212 if (!error && unstuffed) in __gfs2_xattr_set()
1217 return error; in __gfs2_xattr_set()
1220 error = -ENODATA; in __gfs2_xattr_set()
1222 error = ea_set_i(ip, type, name, value, size, NULL); in __gfs2_xattr_set()
1224 return error; in __gfs2_xattr_set()
1274 int error; in ea_dealloc_indirect() local
1276 error = gfs2_rindex_update(sdp); in ea_dealloc_indirect()
1277 if (error) in ea_dealloc_indirect()
1278 return error; in ea_dealloc_indirect()
1282 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, 0, &indbh); in ea_dealloc_indirect()
1283 if (error) in ea_dealloc_indirect()
1284 return error; in ea_dealloc_indirect()
1287 error = -EIO; in ea_dealloc_indirect()
1323 error = gfs2_glock_nq_m(rlist.rl_rgrps, rlist.rl_ghs); in ea_dealloc_indirect()
1324 if (error) in ea_dealloc_indirect()
1327 error = gfs2_trans_begin(sdp, rg_blocks + RES_DINODE + RES_INDIRECT + in ea_dealloc_indirect()
1329 if (error) in ea_dealloc_indirect()
1364 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_indirect()
1365 if (!error) { in ea_dealloc_indirect()
1379 return error; in ea_dealloc_indirect()
1388 int error; in ea_dealloc_block() local
1390 error = gfs2_rindex_update(sdp); in ea_dealloc_block()
1391 if (error) in ea_dealloc_block()
1392 return error; in ea_dealloc_block()
1400 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, in ea_dealloc_block()
1402 if (error) in ea_dealloc_block()
1403 return error; in ea_dealloc_block()
1405 error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_DINODE + RES_STATFS + in ea_dealloc_block()
1407 if (error) in ea_dealloc_block()
1416 error = gfs2_meta_inode_buffer(ip, &dibh); in ea_dealloc_block()
1417 if (!error) { in ea_dealloc_block()
1428 return error; in ea_dealloc_block()
1440 int error; in gfs2_ea_dealloc() local
1442 error = gfs2_rindex_update(GFS2_SB(&ip->i_inode)); in gfs2_ea_dealloc()
1443 if (error) in gfs2_ea_dealloc()
1444 return error; in gfs2_ea_dealloc()
1446 error = gfs2_quota_hold(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE); in gfs2_ea_dealloc()
1447 if (error) in gfs2_ea_dealloc()
1448 return error; in gfs2_ea_dealloc()
1451 error = ea_foreach(ip, ea_dealloc_unstuffed, NULL); in gfs2_ea_dealloc()
1452 if (error) in gfs2_ea_dealloc()
1456 error = ea_dealloc_indirect(ip); in gfs2_ea_dealloc()
1457 if (error) in gfs2_ea_dealloc()
1462 error = ea_dealloc_block(ip); in gfs2_ea_dealloc()
1466 return error; in gfs2_ea_dealloc()