• Home
  • Raw
  • Download

Lines Matching refs:status

100 	int status;  in ocfs2_lookup()  local
115 status = ocfs2_inode_lock_nested(dir, NULL, 0, OI_LS_PARENT); in ocfs2_lookup()
116 if (status < 0) { in ocfs2_lookup()
117 if (status != -ENOENT) in ocfs2_lookup()
118 mlog_errno(status); in ocfs2_lookup()
119 ret = ERR_PTR(status); in ocfs2_lookup()
123 status = ocfs2_lookup_ino_from_name(dir, dentry->d_name.name, in ocfs2_lookup()
125 if (status < 0) in ocfs2_lookup()
161 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_lookup()
163 if (status) { in ocfs2_lookup()
164 mlog_errno(status); in ocfs2_lookup()
165 ret = ERR_PTR(status); in ocfs2_lookup()
188 int status; in ocfs2_get_init_inode() local
202 status = dquot_initialize(inode); in ocfs2_get_init_inode()
203 if (status) in ocfs2_get_init_inode()
204 return ERR_PTR(status); in ocfs2_get_init_inode()
229 int status = 0; in ocfs2_mknod() local
255 status = dquot_initialize(dir); in ocfs2_mknod()
256 if (status) { in ocfs2_mknod()
257 mlog_errno(status); in ocfs2_mknod()
258 return status; in ocfs2_mknod()
264 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_mknod()
265 if (status < 0) { in ocfs2_mknod()
266 if (status != -ENOENT) in ocfs2_mknod()
267 mlog_errno(status); in ocfs2_mknod()
268 return status; in ocfs2_mknod()
272 status = -EMLINK; in ocfs2_mknod()
279 status = -ENOENT; in ocfs2_mknod()
283 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mknod()
285 if (status) in ocfs2_mknod()
289 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_mknod()
292 if (status < 0) { in ocfs2_mknod()
293 mlog_errno(status); in ocfs2_mknod()
298 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_mknod()
299 if (status < 0) { in ocfs2_mknod()
300 if (status != -ENOSPC) in ocfs2_mknod()
301 mlog_errno(status); in ocfs2_mknod()
307 status = PTR_ERR(inode); in ocfs2_mknod()
309 mlog_errno(status); in ocfs2_mknod()
314 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_mknod()
315 if (status) { in ocfs2_mknod()
316 if (status == -EOPNOTSUPP) in ocfs2_mknod()
319 mlog_errno(status); in ocfs2_mknod()
325 status = ocfs2_calc_xattr_init(dir, parent_fe_bh, mode, in ocfs2_mknod()
328 if (status < 0) { in ocfs2_mknod()
329 mlog_errno(status); in ocfs2_mknod()
342 status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac); in ocfs2_mknod()
343 if (status < 0) { in ocfs2_mknod()
344 if (status != -ENOSPC) in ocfs2_mknod()
345 mlog_errno(status); in ocfs2_mknod()
349 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_mknod()
350 if (status < 0) { in ocfs2_mknod()
351 if (status != -ENOSPC) in ocfs2_mknod()
352 mlog_errno(status); in ocfs2_mknod()
360 status = PTR_ERR(handle); in ocfs2_mknod()
362 mlog_errno(status); in ocfs2_mknod()
370 status = dquot_alloc_inode(inode); in ocfs2_mknod()
371 if (status) in ocfs2_mknod()
376 status = ocfs2_mknod_locked(osb, dir, inode, dev, in ocfs2_mknod()
379 if (status < 0) { in ocfs2_mknod()
380 mlog_errno(status); in ocfs2_mknod()
385 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod()
387 if (status < 0) { in ocfs2_mknod()
388 mlog_errno(status); in ocfs2_mknod()
392 status = ocfs2_journal_access_di(handle, INODE_CACHE(dir), in ocfs2_mknod()
395 if (status < 0) { in ocfs2_mknod()
396 mlog_errno(status); in ocfs2_mknod()
404 status = ocfs2_init_acl(handle, inode, dir, new_fe_bh, parent_fe_bh, in ocfs2_mknod()
407 if (status < 0) { in ocfs2_mknod()
408 mlog_errno(status); in ocfs2_mknod()
413 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_mknod()
415 if (status < 0) { in ocfs2_mknod()
416 mlog_errno(status); in ocfs2_mknod()
426 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mknod()
428 if (status) { in ocfs2_mknod()
429 mlog_errno(status); in ocfs2_mknod()
435 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mknod()
438 if (status < 0) { in ocfs2_mknod()
439 mlog_errno(status); in ocfs2_mknod()
445 status = 0; in ocfs2_mknod()
447 if (status < 0 && did_quota_inode) in ocfs2_mknod()
476 if ((status < 0) && inode) { in ocfs2_mknod()
485 if (status) in ocfs2_mknod()
486 mlog_errno(status); in ocfs2_mknod()
488 return status; in ocfs2_mknod()
500 int status = 0; in __ocfs2_mknod_locked() local
521 status = -ENOMEM; in __ocfs2_mknod_locked()
522 mlog_errno(status); in __ocfs2_mknod_locked()
527 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_mknod_locked()
530 if (status < 0) { in __ocfs2_mknod_locked()
531 mlog_errno(status); in __ocfs2_mknod_locked()
584 status = ocfs2_create_new_inode_locks(inode); in __ocfs2_mknod_locked()
585 if (status < 0) in __ocfs2_mknod_locked()
586 mlog_errno(status); in __ocfs2_mknod_locked()
593 if (status < 0) { in __ocfs2_mknod_locked()
600 if (status) in __ocfs2_mknod_locked()
601 mlog_errno(status); in __ocfs2_mknod_locked()
602 return status; in __ocfs2_mknod_locked()
614 int status = 0; in ocfs2_mknod_locked() local
620 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh, in ocfs2_mknod_locked()
623 if (status < 0) { in ocfs2_mknod_locked()
624 mlog_errno(status); in ocfs2_mknod_locked()
625 return status; in ocfs2_mknod_locked()
628 status = __ocfs2_mknod_locked(dir, inode, dev, new_fe_bh, in ocfs2_mknod_locked()
631 if (status < 0) { in ocfs2_mknod_locked()
639 return status; in ocfs2_mknod_locked()
869 int status; in ocfs2_unlink() local
889 status = dquot_initialize(dir); in ocfs2_unlink()
890 if (status) { in ocfs2_unlink()
891 mlog_errno(status); in ocfs2_unlink()
892 return status; in ocfs2_unlink()
900 status = ocfs2_inode_lock_nested(dir, &parent_node_bh, 1, in ocfs2_unlink()
902 if (status < 0) { in ocfs2_unlink()
903 if (status != -ENOENT) in ocfs2_unlink()
904 mlog_errno(status); in ocfs2_unlink()
905 return status; in ocfs2_unlink()
908 status = ocfs2_find_files_on_disk(dentry->d_name.name, in ocfs2_unlink()
911 if (status < 0) { in ocfs2_unlink()
912 if (status != -ENOENT) in ocfs2_unlink()
913 mlog_errno(status); in ocfs2_unlink()
918 status = -ENOENT; in ocfs2_unlink()
927 status = ocfs2_inode_lock(inode, &fe_bh, 1); in ocfs2_unlink()
928 if (status < 0) { in ocfs2_unlink()
929 if (status != -ENOENT) in ocfs2_unlink()
930 mlog_errno(status); in ocfs2_unlink()
937 status = -ENOTEMPTY; in ocfs2_unlink()
942 status = ocfs2_remote_dentry_delete(dentry); in ocfs2_unlink()
943 if (status < 0) { in ocfs2_unlink()
946 mlog_errno(status); in ocfs2_unlink()
951 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_unlink()
955 if (status < 0) { in ocfs2_unlink()
956 mlog_errno(status); in ocfs2_unlink()
964 status = PTR_ERR(handle); in ocfs2_unlink()
966 mlog_errno(status); in ocfs2_unlink()
970 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), fe_bh, in ocfs2_unlink()
972 if (status < 0) { in ocfs2_unlink()
973 mlog_errno(status); in ocfs2_unlink()
980 status = ocfs2_delete_entry(handle, dir, &lookup); in ocfs2_unlink()
981 if (status < 0) { in ocfs2_unlink()
982 mlog_errno(status); in ocfs2_unlink()
996 status = ocfs2_mark_inode_dirty(handle, dir, parent_node_bh); in ocfs2_unlink()
997 if (status < 0) { in ocfs2_unlink()
998 mlog_errno(status); in ocfs2_unlink()
1005 status = ocfs2_orphan_add(osb, handle, inode, fe_bh, in ocfs2_unlink()
1007 if (status < 0) in ocfs2_unlink()
1008 mlog_errno(status); in ocfs2_unlink()
1033 if (status && (status != -ENOTEMPTY) && (status != -ENOENT)) in ocfs2_unlink()
1034 mlog_errno(status); in ocfs2_unlink()
1036 return status; in ocfs2_unlink()
1109 int status; in ocfs2_double_lock() local
1128 status = inode1_is_ancestor; in ocfs2_double_lock()
1135 status = inode2_is_ancestor; in ocfs2_double_lock()
1147 status = ocfs2_inode_lock_nested(inode2, bh2, 1, in ocfs2_double_lock()
1149 if (status < 0) { in ocfs2_double_lock()
1150 if (status != -ENOENT) in ocfs2_double_lock()
1151 mlog_errno(status); in ocfs2_double_lock()
1157 status = ocfs2_inode_lock_nested(inode1, bh1, 1, in ocfs2_double_lock()
1159 if (status < 0) { in ocfs2_double_lock()
1170 if (status != -ENOENT) in ocfs2_double_lock()
1171 mlog_errno(status); in ocfs2_double_lock()
1179 if (status) in ocfs2_double_lock()
1180 mlog_errno(status); in ocfs2_double_lock()
1181 return status; in ocfs2_double_lock()
1198 int status = 0, rename_lock = 0, parents_locked = 0, target_exists = 0; in ocfs2_rename() local
1231 status = dquot_initialize(old_dir); in ocfs2_rename()
1232 if (status) { in ocfs2_rename()
1233 mlog_errno(status); in ocfs2_rename()
1236 status = dquot_initialize(new_dir); in ocfs2_rename()
1237 if (status) { in ocfs2_rename()
1238 mlog_errno(status); in ocfs2_rename()
1261 status = ocfs2_rename_lock(osb); in ocfs2_rename()
1262 if (status < 0) { in ocfs2_rename()
1263 mlog_errno(status); in ocfs2_rename()
1270 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename()
1272 if (status < 0) { in ocfs2_rename()
1273 mlog_errno(status); in ocfs2_rename()
1275 } else if (status == 1) { in ocfs2_rename()
1276 status = -EPERM; in ocfs2_rename()
1285 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_rename()
1287 if (status < 0) { in ocfs2_rename()
1288 mlog_errno(status); in ocfs2_rename()
1294 status = -EACCES; in ocfs2_rename()
1306 status = -EIO; in ocfs2_rename()
1317 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1, in ocfs2_rename()
1319 if (status < 0) { in ocfs2_rename()
1320 if (status != -ENOENT) in ocfs2_rename()
1321 mlog_errno(status); in ocfs2_rename()
1326 status = ocfs2_remote_dentry_delete(old_dentry); in ocfs2_rename()
1327 if (status < 0) { in ocfs2_rename()
1328 mlog_errno(status); in ocfs2_rename()
1336 status = ocfs2_find_files_on_disk("..", 2, &old_inode_parent, in ocfs2_rename()
1339 if (status) { in ocfs2_rename()
1340 status = -EIO; in ocfs2_rename()
1345 status = -EIO; in ocfs2_rename()
1351 status = -EMLINK; in ocfs2_rename()
1356 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_rename()
1359 if (status) { in ocfs2_rename()
1360 status = -ENOENT; in ocfs2_rename()
1371 status = -ENOENT; in ocfs2_rename()
1377 status = ocfs2_find_files_on_disk(new_dentry->d_name.name, in ocfs2_rename()
1383 if ((status < 0) && (status != -ENOENT)) { in ocfs2_rename()
1386 mlog_errno(status); in ocfs2_rename()
1389 if (status == 0) in ocfs2_rename()
1399 status = -ENOENT; in ocfs2_rename()
1412 status = -EACCES; in ocfs2_rename()
1420 status = -EACCES; in ocfs2_rename()
1429 status = ocfs2_inode_lock(new_inode, &newfe_bh, 1); in ocfs2_rename()
1430 if (status < 0) { in ocfs2_rename()
1431 if (status != -ENOENT) in ocfs2_rename()
1432 mlog_errno(status); in ocfs2_rename()
1437 status = ocfs2_remote_dentry_delete(new_dentry); in ocfs2_rename()
1438 if (status < 0) { in ocfs2_rename()
1439 mlog_errno(status); in ocfs2_rename()
1450 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_rename()
1454 if (status < 0) { in ocfs2_rename()
1455 mlog_errno(status); in ocfs2_rename()
1463 status = ocfs2_check_dir_for_entry(new_dir, in ocfs2_rename()
1466 if (status) in ocfs2_rename()
1469 status = ocfs2_prepare_dir_for_insert(osb, new_dir, new_dir_bh, in ocfs2_rename()
1473 if (status < 0) { in ocfs2_rename()
1474 mlog_errno(status); in ocfs2_rename()
1481 status = PTR_ERR(handle); in ocfs2_rename()
1483 mlog_errno(status); in ocfs2_rename()
1491 status = -ENOTEMPTY; in ocfs2_rename()
1495 status = ocfs2_journal_access_di(handle, INODE_CACHE(new_inode), in ocfs2_rename()
1498 if (status < 0) { in ocfs2_rename()
1499 mlog_errno(status); in ocfs2_rename()
1504 status = ocfs2_update_entry(new_dir, handle, &target_lookup_res, in ocfs2_rename()
1506 if (status < 0) { in ocfs2_rename()
1507 mlog_errno(status); in ocfs2_rename()
1518 status = ocfs2_orphan_add(osb, handle, new_inode, in ocfs2_rename()
1521 if (status < 0) { in ocfs2_rename()
1522 mlog_errno(status); in ocfs2_rename()
1528 status = ocfs2_add_entry(handle, new_dentry, old_inode, in ocfs2_rename()
1536 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode), in ocfs2_rename()
1539 if (status >= 0) { in ocfs2_rename()
1546 mlog_errno(status); in ocfs2_rename()
1555 status = ocfs2_find_entry(old_dentry->d_name.name, in ocfs2_rename()
1558 if (status) { in ocfs2_rename()
1568 status = ocfs2_delete_entry(handle, old_dir, &old_entry_lookup); in ocfs2_rename()
1569 if (status < 0) { in ocfs2_rename()
1570 mlog_errno(status); in ocfs2_rename()
1587 status = ocfs2_update_entry(old_inode, handle, in ocfs2_rename()
1623 status = ocfs2_journal_access_di(handle, in ocfs2_rename()
1633 status = 0; in ocfs2_rename()
1673 if (status) in ocfs2_rename()
1674 mlog_errno(status); in ocfs2_rename()
1676 return status; in ocfs2_rename()
1692 int virtual, blocks, status, i, bytes_left; in ocfs2_create_symlink_data() local
1705 status = -EIO; in ocfs2_create_symlink_data()
1706 mlog_errno(status); in ocfs2_create_symlink_data()
1712 status = -ENOMEM; in ocfs2_create_symlink_data()
1713 mlog_errno(status); in ocfs2_create_symlink_data()
1717 status = ocfs2_extent_map_get_blocks(inode, 0, &p_blkno, &p_blocks, in ocfs2_create_symlink_data()
1719 if (status < 0) { in ocfs2_create_symlink_data()
1720 mlog_errno(status); in ocfs2_create_symlink_data()
1728 status = -EIO; in ocfs2_create_symlink_data()
1729 mlog_errno(status); in ocfs2_create_symlink_data()
1739 status = -ENOMEM; in ocfs2_create_symlink_data()
1740 mlog_errno(status); in ocfs2_create_symlink_data()
1746 status = ocfs2_journal_access(handle, INODE_CACHE(inode), in ocfs2_create_symlink_data()
1749 if (status < 0) { in ocfs2_create_symlink_data()
1750 mlog_errno(status); in ocfs2_create_symlink_data()
1767 status = 0; in ocfs2_create_symlink_data()
1776 if (status) in ocfs2_create_symlink_data()
1777 mlog_errno(status); in ocfs2_create_symlink_data()
1778 return status; in ocfs2_create_symlink_data()
1785 int status, l, credits; in ocfs2_symlink() local
1812 status = dquot_initialize(dir); in ocfs2_symlink()
1813 if (status) { in ocfs2_symlink()
1814 mlog_errno(status); in ocfs2_symlink()
1826 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_symlink()
1827 if (status < 0) { in ocfs2_symlink()
1828 if (status != -ENOENT) in ocfs2_symlink()
1829 mlog_errno(status); in ocfs2_symlink()
1830 return status; in ocfs2_symlink()
1836 status = -ENOENT; in ocfs2_symlink()
1840 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_symlink()
1842 if (status) in ocfs2_symlink()
1845 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_symlink()
1848 if (status < 0) { in ocfs2_symlink()
1849 mlog_errno(status); in ocfs2_symlink()
1853 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_symlink()
1854 if (status < 0) { in ocfs2_symlink()
1855 if (status != -ENOSPC) in ocfs2_symlink()
1856 mlog_errno(status); in ocfs2_symlink()
1862 status = PTR_ERR(inode); in ocfs2_symlink()
1864 mlog_errno(status); in ocfs2_symlink()
1869 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_symlink()
1870 if (status) { in ocfs2_symlink()
1871 if (status == -EOPNOTSUPP) in ocfs2_symlink()
1874 mlog_errno(status); in ocfs2_symlink()
1881 status = ocfs2_calc_security_init(dir, &si, &want_clusters, in ocfs2_symlink()
1883 if (status < 0) { in ocfs2_symlink()
1884 mlog_errno(status); in ocfs2_symlink()
1893 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_symlink()
1894 if (status < 0) { in ocfs2_symlink()
1895 if (status != -ENOSPC) in ocfs2_symlink()
1896 mlog_errno(status); in ocfs2_symlink()
1902 status = PTR_ERR(handle); in ocfs2_symlink()
1904 mlog_errno(status); in ocfs2_symlink()
1912 status = dquot_alloc_inode(inode); in ocfs2_symlink()
1913 if (status) in ocfs2_symlink()
1922 status = ocfs2_mknod_locked(osb, dir, inode, in ocfs2_symlink()
1925 if (status < 0) { in ocfs2_symlink()
1926 mlog_errno(status); in ocfs2_symlink()
1938 status = dquot_alloc_space_nodirty(inode, in ocfs2_symlink()
1940 if (status) in ocfs2_symlink()
1944 status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, in ocfs2_symlink()
1948 if (status < 0) { in ocfs2_symlink()
1949 if (status != -ENOSPC && status != -EINTR) { in ocfs2_symlink()
1953 mlog_errno(status); in ocfs2_symlink()
1954 status = -ENOSPC; in ocfs2_symlink()
1967 status = ocfs2_mark_inode_dirty(handle, inode, new_fe_bh); in ocfs2_symlink()
1968 if (status < 0) { in ocfs2_symlink()
1969 mlog_errno(status); in ocfs2_symlink()
1974 status = ocfs2_create_symlink_data(osb, handle, inode, in ocfs2_symlink()
1976 if (status < 0) { in ocfs2_symlink()
1977 mlog_errno(status); in ocfs2_symlink()
1983 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_symlink()
1985 if (status < 0) { in ocfs2_symlink()
1986 mlog_errno(status); in ocfs2_symlink()
1996 status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); in ocfs2_symlink()
1997 if (status) { in ocfs2_symlink()
1998 mlog_errno(status); in ocfs2_symlink()
2004 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_symlink()
2007 if (status < 0) { in ocfs2_symlink()
2008 mlog_errno(status); in ocfs2_symlink()
2015 if (status < 0 && did_quota) in ocfs2_symlink()
2018 if (status < 0 && did_quota_inode) in ocfs2_symlink()
2037 if ((status < 0) && inode) { in ocfs2_symlink()
2046 if (status) in ocfs2_symlink()
2047 mlog_errno(status); in ocfs2_symlink()
2049 return status; in ocfs2_symlink()
2054 int status, namelen; in ocfs2_blkno_stringify() local
2060 status = namelen; in ocfs2_blkno_stringify()
2062 status = -EINVAL; in ocfs2_blkno_stringify()
2063 mlog_errno(status); in ocfs2_blkno_stringify()
2067 status = -EINVAL; in ocfs2_blkno_stringify()
2068 mlog_errno(status); in ocfs2_blkno_stringify()
2074 status = 0; in ocfs2_blkno_stringify()
2076 if (status < 0) in ocfs2_blkno_stringify()
2077 mlog_errno(status); in ocfs2_blkno_stringify()
2078 return status; in ocfs2_blkno_stringify()
2222 int status = 0; in ocfs2_orphan_add() local
2232 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh); in ocfs2_orphan_add()
2233 if (status < 0) { in ocfs2_orphan_add()
2234 mlog_errno(status); in ocfs2_orphan_add()
2238 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2242 if (status < 0) { in ocfs2_orphan_add()
2243 mlog_errno(status); in ocfs2_orphan_add()
2253 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2257 if (status < 0) { in ocfs2_orphan_add()
2258 mlog_errno(status); in ocfs2_orphan_add()
2270 status = __ocfs2_add_entry(handle, orphan_dir_inode, name, in ocfs2_orphan_add()
2274 if (status < 0) { in ocfs2_orphan_add()
2275 mlog_errno(status); in ocfs2_orphan_add()
2301 if (status < 0) { in ocfs2_orphan_add()
2310 return status; in ocfs2_orphan_add()
2323 int status = 0; in ocfs2_orphan_del() local
2327 status = snprintf(name, OCFS2_DIO_ORPHAN_PREFIX_LEN + 1, "%s", in ocfs2_orphan_del()
2329 if (status != OCFS2_DIO_ORPHAN_PREFIX_LEN) { in ocfs2_orphan_del()
2330 status = -EINVAL; in ocfs2_orphan_del()
2331 mlog_errno(status); in ocfs2_orphan_del()
2332 return status; in ocfs2_orphan_del()
2335 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, in ocfs2_orphan_del()
2338 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name); in ocfs2_orphan_del()
2339 if (status < 0) { in ocfs2_orphan_del()
2340 mlog_errno(status); in ocfs2_orphan_del()
2348 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_del()
2352 if (status < 0) { in ocfs2_orphan_del()
2353 mlog_errno(status); in ocfs2_orphan_del()
2358 status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode, in ocfs2_orphan_del()
2360 if (status) { in ocfs2_orphan_del()
2361 mlog_errno(status); in ocfs2_orphan_del()
2366 status = ocfs2_delete_entry(handle, orphan_dir_inode, &lookup); in ocfs2_orphan_del()
2367 if (status < 0) { in ocfs2_orphan_del()
2368 mlog_errno(status); in ocfs2_orphan_del()
2382 if (status) in ocfs2_orphan_del()
2383 mlog_errno(status); in ocfs2_orphan_del()
2384 return status; in ocfs2_orphan_del()
2485 int status, did_quota_inode = 0; in ocfs2_create_inode_in_orphan() local
2498 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_create_inode_in_orphan()
2499 if (status < 0) { in ocfs2_create_inode_in_orphan()
2500 if (status != -ENOENT) in ocfs2_create_inode_in_orphan()
2501 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2502 return status; in ocfs2_create_inode_in_orphan()
2505 status = ocfs2_prep_new_orphaned_file(dir, parent_di_bh, in ocfs2_create_inode_in_orphan()
2508 if (status < 0) { in ocfs2_create_inode_in_orphan()
2509 if (status != -ENOSPC) in ocfs2_create_inode_in_orphan()
2510 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2516 status = PTR_ERR(inode); in ocfs2_create_inode_in_orphan()
2518 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2524 status = PTR_ERR(handle); in ocfs2_create_inode_in_orphan()
2526 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2530 status = dquot_alloc_inode(inode); in ocfs2_create_inode_in_orphan()
2531 if (status) in ocfs2_create_inode_in_orphan()
2535 status = ocfs2_claim_new_inode_at_loc(handle, dir, inode_ac, in ocfs2_create_inode_in_orphan()
2538 if (status < 0) { in ocfs2_create_inode_in_orphan()
2539 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2545 status = __ocfs2_mknod_locked(dir, inode, in ocfs2_create_inode_in_orphan()
2549 if (status < 0) { in ocfs2_create_inode_in_orphan()
2550 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2554 status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, in ocfs2_create_inode_in_orphan()
2556 if (status < 0) { in ocfs2_create_inode_in_orphan()
2557 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2562 status = ocfs2_open_lock(inode); in ocfs2_create_inode_in_orphan()
2563 if (status < 0) in ocfs2_create_inode_in_orphan()
2564 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2568 if (status < 0 && did_quota_inode) in ocfs2_create_inode_in_orphan()
2580 if ((status < 0) && inode) { in ocfs2_create_inode_in_orphan()
2590 if (!status) in ocfs2_create_inode_in_orphan()
2597 return status; in ocfs2_create_inode_in_orphan()
2607 int status = 0; in ocfs2_add_inode_to_orphan() local
2611 status = ocfs2_inode_lock(inode, &di_bh, 1); in ocfs2_add_inode_to_orphan()
2612 if (status < 0) { in ocfs2_add_inode_to_orphan()
2613 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2623 status = ocfs2_truncate_file(inode, di_bh, i_size_read(inode)); in ocfs2_add_inode_to_orphan()
2624 if (status < 0) { in ocfs2_add_inode_to_orphan()
2625 if (status != -ENOSPC) in ocfs2_add_inode_to_orphan()
2626 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2630 status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0); in ocfs2_add_inode_to_orphan()
2631 if (status < 0) { in ocfs2_add_inode_to_orphan()
2632 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2637 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode, in ocfs2_add_inode_to_orphan()
2642 if (status < 0) { in ocfs2_add_inode_to_orphan()
2643 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2650 status = PTR_ERR(handle); in ocfs2_add_inode_to_orphan()
2654 status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name, in ocfs2_add_inode_to_orphan()
2656 if (status) in ocfs2_add_inode_to_orphan()
2657 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2673 return status; in ocfs2_add_inode_to_orphan()
2684 int status = 0; in ocfs2_del_inode_from_orphan() local
2690 status = -ENOENT; in ocfs2_del_inode_from_orphan()
2691 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2696 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_del_inode_from_orphan()
2697 if (status < 0) { in ocfs2_del_inode_from_orphan()
2700 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2707 status = PTR_ERR(handle); in ocfs2_del_inode_from_orphan()
2713 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, in ocfs2_del_inode_from_orphan()
2715 if (status < 0) { in ocfs2_del_inode_from_orphan()
2716 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2720 status = ocfs2_journal_access_di(handle, in ocfs2_del_inode_from_orphan()
2724 if (status < 0) { in ocfs2_del_inode_from_orphan()
2725 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2733 status = ocfs2_set_inode_size(handle, inode, di_bh, end); in ocfs2_del_inode_from_orphan()
2734 if (status) in ocfs2_del_inode_from_orphan()
2735 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2749 return status; in ocfs2_del_inode_from_orphan()
2756 int status = 0; in ocfs2_mv_orphaned_inode_to_new() local
2771 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2772 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2773 if (status != -ENOENT) in ocfs2_mv_orphaned_inode_to_new()
2774 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2775 return status; in ocfs2_mv_orphaned_inode_to_new()
2781 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2785 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mv_orphaned_inode_to_new()
2787 if (status) in ocfs2_mv_orphaned_inode_to_new()
2791 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh, in ocfs2_mv_orphaned_inode_to_new()
2794 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2795 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2803 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2804 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2810 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2811 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2812 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2818 status = ocfs2_read_inode_block(inode, &di_bh); in ocfs2_mv_orphaned_inode_to_new()
2819 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2820 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2826 status = PTR_ERR(handle); in ocfs2_mv_orphaned_inode_to_new()
2828 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2832 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in ocfs2_mv_orphaned_inode_to_new()
2834 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2835 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2839 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, in ocfs2_mv_orphaned_inode_to_new()
2841 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2842 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2854 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2857 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2858 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2862 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2864 if (status) { in ocfs2_mv_orphaned_inode_to_new()
2865 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2870 status = 0; in ocfs2_mv_orphaned_inode_to_new()
2887 if (status) in ocfs2_mv_orphaned_inode_to_new()
2888 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2890 return status; in ocfs2_mv_orphaned_inode_to_new()