Lines Matching refs:status
99 int status; in ocfs2_lookup() local
114 status = ocfs2_inode_lock_nested(dir, NULL, 0, OI_LS_PARENT); in ocfs2_lookup()
115 if (status < 0) { in ocfs2_lookup()
116 if (status != -ENOENT) in ocfs2_lookup()
117 mlog_errno(status); in ocfs2_lookup()
118 ret = ERR_PTR(status); in ocfs2_lookup()
122 status = ocfs2_lookup_ino_from_name(dir, dentry->d_name.name, in ocfs2_lookup()
124 if (status < 0) in ocfs2_lookup()
160 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_lookup()
162 if (status) { in ocfs2_lookup()
163 mlog_errno(status); in ocfs2_lookup()
164 ret = ERR_PTR(status); in ocfs2_lookup()
187 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()
230 int status = 0; in ocfs2_mknod() local
258 status = dquot_initialize(dir); in ocfs2_mknod()
259 if (status) { in ocfs2_mknod()
260 mlog_errno(status); in ocfs2_mknod()
261 return status; in ocfs2_mknod()
267 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_mknod()
268 if (status < 0) { in ocfs2_mknod()
269 if (status != -ENOENT) in ocfs2_mknod()
270 mlog_errno(status); in ocfs2_mknod()
271 return status; in ocfs2_mknod()
275 status = -EMLINK; in ocfs2_mknod()
282 status = -ENOENT; in ocfs2_mknod()
286 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mknod()
288 if (status) in ocfs2_mknod()
292 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_mknod()
295 if (status < 0) { in ocfs2_mknod()
296 mlog_errno(status); in ocfs2_mknod()
301 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_mknod()
302 if (status < 0) { in ocfs2_mknod()
303 if (status != -ENOSPC) in ocfs2_mknod()
304 mlog_errno(status); in ocfs2_mknod()
310 status = PTR_ERR(inode); in ocfs2_mknod()
312 mlog_errno(status); in ocfs2_mknod()
317 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_mknod()
318 if (status) { in ocfs2_mknod()
319 if (status == -EOPNOTSUPP) in ocfs2_mknod()
322 mlog_errno(status); in ocfs2_mknod()
328 status = ocfs2_calc_xattr_init(dir, parent_fe_bh, mode, in ocfs2_mknod()
331 if (status < 0) { in ocfs2_mknod()
332 mlog_errno(status); in ocfs2_mknod()
345 status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac); in ocfs2_mknod()
346 if (status < 0) { in ocfs2_mknod()
347 if (status != -ENOSPC) in ocfs2_mknod()
348 mlog_errno(status); in ocfs2_mknod()
352 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_mknod()
353 if (status < 0) { in ocfs2_mknod()
354 if (status != -ENOSPC) in ocfs2_mknod()
355 mlog_errno(status); in ocfs2_mknod()
363 status = PTR_ERR(handle); in ocfs2_mknod()
365 mlog_errno(status); in ocfs2_mknod()
373 status = dquot_alloc_inode(inode); in ocfs2_mknod()
374 if (status) in ocfs2_mknod()
379 status = ocfs2_mknod_locked(osb, dir, inode, dev, in ocfs2_mknod()
382 if (status < 0) { in ocfs2_mknod()
383 mlog_errno(status); in ocfs2_mknod()
389 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod()
391 if (status < 0) { in ocfs2_mknod()
392 mlog_errno(status); in ocfs2_mknod()
396 status = ocfs2_journal_access_di(handle, INODE_CACHE(dir), in ocfs2_mknod()
399 if (status < 0) { in ocfs2_mknod()
400 mlog_errno(status); in ocfs2_mknod()
408 status = ocfs2_init_acl(handle, inode, dir, new_fe_bh, parent_fe_bh, in ocfs2_mknod()
411 if (status < 0) { in ocfs2_mknod()
412 mlog_errno(status); in ocfs2_mknod()
417 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_mknod()
419 if (status < 0) { in ocfs2_mknod()
420 mlog_errno(status); in ocfs2_mknod()
430 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mknod()
432 if (status) { in ocfs2_mknod()
433 mlog_errno(status); in ocfs2_mknod()
439 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mknod()
442 if (status < 0) { in ocfs2_mknod()
443 mlog_errno(status); in ocfs2_mknod()
449 status = 0; in ocfs2_mknod()
452 if (status < 0 && S_ISDIR(mode)) { in ocfs2_mknod()
458 if (status < 0 && did_quota_inode) in ocfs2_mknod()
461 if (status < 0 && fe) in ocfs2_mknod()
490 if ((status < 0) && inode) { in ocfs2_mknod()
499 if (status) in ocfs2_mknod()
500 mlog_errno(status); in ocfs2_mknod()
502 return status; in ocfs2_mknod()
514 int status = 0; in __ocfs2_mknod_locked() local
535 status = -ENOMEM; in __ocfs2_mknod_locked()
536 mlog_errno(status); in __ocfs2_mknod_locked()
541 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_mknod_locked()
544 if (status < 0) { in __ocfs2_mknod_locked()
545 mlog_errno(status); in __ocfs2_mknod_locked()
598 status = ocfs2_create_new_inode_locks(inode); in __ocfs2_mknod_locked()
599 if (status < 0) in __ocfs2_mknod_locked()
600 mlog_errno(status); in __ocfs2_mknod_locked()
606 if (status < 0) { in __ocfs2_mknod_locked()
613 if (status) in __ocfs2_mknod_locked()
614 mlog_errno(status); in __ocfs2_mknod_locked()
615 return status; in __ocfs2_mknod_locked()
627 int status = 0; in ocfs2_mknod_locked() local
633 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh, in ocfs2_mknod_locked()
636 if (status < 0) { in ocfs2_mknod_locked()
637 mlog_errno(status); in ocfs2_mknod_locked()
638 return status; in ocfs2_mknod_locked()
875 int status; in ocfs2_unlink() local
895 status = dquot_initialize(dir); in ocfs2_unlink()
896 if (status) { in ocfs2_unlink()
897 mlog_errno(status); in ocfs2_unlink()
898 return status; in ocfs2_unlink()
906 status = ocfs2_inode_lock_nested(dir, &parent_node_bh, 1, in ocfs2_unlink()
908 if (status < 0) { in ocfs2_unlink()
909 if (status != -ENOENT) in ocfs2_unlink()
910 mlog_errno(status); in ocfs2_unlink()
911 return status; in ocfs2_unlink()
914 status = ocfs2_find_files_on_disk(dentry->d_name.name, in ocfs2_unlink()
917 if (status < 0) { in ocfs2_unlink()
918 if (status != -ENOENT) in ocfs2_unlink()
919 mlog_errno(status); in ocfs2_unlink()
924 status = -ENOENT; in ocfs2_unlink()
933 status = ocfs2_inode_lock(inode, &fe_bh, 1); in ocfs2_unlink()
934 if (status < 0) { in ocfs2_unlink()
935 if (status != -ENOENT) in ocfs2_unlink()
936 mlog_errno(status); in ocfs2_unlink()
943 status = -ENOTEMPTY; in ocfs2_unlink()
948 status = ocfs2_remote_dentry_delete(dentry); in ocfs2_unlink()
949 if (status < 0) { in ocfs2_unlink()
952 mlog_errno(status); in ocfs2_unlink()
957 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_unlink()
961 if (status < 0) { in ocfs2_unlink()
962 mlog_errno(status); in ocfs2_unlink()
970 status = PTR_ERR(handle); in ocfs2_unlink()
972 mlog_errno(status); in ocfs2_unlink()
976 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), fe_bh, in ocfs2_unlink()
978 if (status < 0) { in ocfs2_unlink()
979 mlog_errno(status); in ocfs2_unlink()
986 status = ocfs2_delete_entry(handle, dir, &lookup); in ocfs2_unlink()
987 if (status < 0) { in ocfs2_unlink()
988 mlog_errno(status); in ocfs2_unlink()
1002 status = ocfs2_mark_inode_dirty(handle, dir, parent_node_bh); in ocfs2_unlink()
1003 if (status < 0) { in ocfs2_unlink()
1004 mlog_errno(status); in ocfs2_unlink()
1011 status = ocfs2_orphan_add(osb, handle, inode, fe_bh, in ocfs2_unlink()
1013 if (status < 0) in ocfs2_unlink()
1014 mlog_errno(status); in ocfs2_unlink()
1039 if (status && (status != -ENOTEMPTY) && (status != -ENOENT)) in ocfs2_unlink()
1040 mlog_errno(status); in ocfs2_unlink()
1042 return status; in ocfs2_unlink()
1115 int status; in ocfs2_double_lock() local
1134 status = inode1_is_ancestor; in ocfs2_double_lock()
1141 status = inode2_is_ancestor; in ocfs2_double_lock()
1153 status = ocfs2_inode_lock_nested(inode2, bh2, 1, in ocfs2_double_lock()
1155 if (status < 0) { in ocfs2_double_lock()
1156 if (status != -ENOENT) in ocfs2_double_lock()
1157 mlog_errno(status); in ocfs2_double_lock()
1163 status = ocfs2_inode_lock_nested(inode1, bh1, 1, in ocfs2_double_lock()
1165 if (status < 0) { in ocfs2_double_lock()
1176 if (status != -ENOENT) in ocfs2_double_lock()
1177 mlog_errno(status); in ocfs2_double_lock()
1185 if (status) in ocfs2_double_lock()
1186 mlog_errno(status); in ocfs2_double_lock()
1187 return status; in ocfs2_double_lock()
1205 int status = 0, rename_lock = 0, parents_locked = 0, target_exists = 0; in ocfs2_rename() local
1238 status = dquot_initialize(old_dir); in ocfs2_rename()
1239 if (status) { in ocfs2_rename()
1240 mlog_errno(status); in ocfs2_rename()
1243 status = dquot_initialize(new_dir); in ocfs2_rename()
1244 if (status) { in ocfs2_rename()
1245 mlog_errno(status); in ocfs2_rename()
1268 status = ocfs2_rename_lock(osb); in ocfs2_rename()
1269 if (status < 0) { in ocfs2_rename()
1270 mlog_errno(status); in ocfs2_rename()
1277 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename()
1279 if (status < 0) { in ocfs2_rename()
1280 mlog_errno(status); in ocfs2_rename()
1282 } else if (status == 1) { in ocfs2_rename()
1283 status = -EPERM; in ocfs2_rename()
1292 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_rename()
1294 if (status < 0) { in ocfs2_rename()
1295 mlog_errno(status); in ocfs2_rename()
1301 status = -EACCES; in ocfs2_rename()
1313 status = -EIO; in ocfs2_rename()
1324 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1, in ocfs2_rename()
1326 if (status < 0) { in ocfs2_rename()
1327 if (status != -ENOENT) in ocfs2_rename()
1328 mlog_errno(status); in ocfs2_rename()
1333 status = ocfs2_remote_dentry_delete(old_dentry); in ocfs2_rename()
1334 if (status < 0) { in ocfs2_rename()
1335 mlog_errno(status); in ocfs2_rename()
1343 status = ocfs2_find_files_on_disk("..", 2, &old_inode_parent, in ocfs2_rename()
1346 if (status) { in ocfs2_rename()
1347 status = -EIO; in ocfs2_rename()
1352 status = -EIO; in ocfs2_rename()
1358 status = -EMLINK; in ocfs2_rename()
1363 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_rename()
1366 if (status) { in ocfs2_rename()
1367 status = -ENOENT; in ocfs2_rename()
1378 status = -ENOENT; in ocfs2_rename()
1384 status = ocfs2_find_files_on_disk(new_dentry->d_name.name, in ocfs2_rename()
1390 if ((status < 0) && (status != -ENOENT)) { in ocfs2_rename()
1393 mlog_errno(status); in ocfs2_rename()
1396 if (status == 0) in ocfs2_rename()
1406 status = -ENOENT; in ocfs2_rename()
1419 status = -EACCES; in ocfs2_rename()
1427 status = -EACCES; in ocfs2_rename()
1436 status = ocfs2_inode_lock(new_inode, &newfe_bh, 1); in ocfs2_rename()
1437 if (status < 0) { in ocfs2_rename()
1438 if (status != -ENOENT) in ocfs2_rename()
1439 mlog_errno(status); in ocfs2_rename()
1444 status = ocfs2_remote_dentry_delete(new_dentry); in ocfs2_rename()
1445 if (status < 0) { in ocfs2_rename()
1446 mlog_errno(status); in ocfs2_rename()
1457 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_rename()
1461 if (status < 0) { in ocfs2_rename()
1462 mlog_errno(status); in ocfs2_rename()
1470 status = ocfs2_check_dir_for_entry(new_dir, in ocfs2_rename()
1473 if (status) in ocfs2_rename()
1476 status = ocfs2_prepare_dir_for_insert(osb, new_dir, new_dir_bh, in ocfs2_rename()
1480 if (status < 0) { in ocfs2_rename()
1481 mlog_errno(status); in ocfs2_rename()
1488 status = PTR_ERR(handle); in ocfs2_rename()
1490 mlog_errno(status); in ocfs2_rename()
1498 status = -ENOTEMPTY; in ocfs2_rename()
1502 status = ocfs2_journal_access_di(handle, INODE_CACHE(new_inode), in ocfs2_rename()
1505 if (status < 0) { in ocfs2_rename()
1506 mlog_errno(status); in ocfs2_rename()
1511 status = ocfs2_update_entry(new_dir, handle, &target_lookup_res, in ocfs2_rename()
1513 if (status < 0) { in ocfs2_rename()
1514 mlog_errno(status); in ocfs2_rename()
1525 status = ocfs2_orphan_add(osb, handle, new_inode, in ocfs2_rename()
1528 if (status < 0) { in ocfs2_rename()
1529 mlog_errno(status); in ocfs2_rename()
1535 status = ocfs2_add_entry(handle, new_dentry, old_inode, in ocfs2_rename()
1538 if (status < 0) { in ocfs2_rename()
1539 mlog_errno(status); in ocfs2_rename()
1547 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode), in ocfs2_rename()
1550 if (status >= 0) { in ocfs2_rename()
1557 mlog_errno(status); in ocfs2_rename()
1566 status = ocfs2_find_entry(old_dentry->d_name.name, in ocfs2_rename()
1569 if (status) { in ocfs2_rename()
1579 status = ocfs2_delete_entry(handle, old_dir, &old_entry_lookup); in ocfs2_rename()
1580 if (status < 0) { in ocfs2_rename()
1581 mlog_errno(status); in ocfs2_rename()
1598 status = ocfs2_update_entry(old_inode, handle, in ocfs2_rename()
1635 status = ocfs2_journal_access_di(handle, in ocfs2_rename()
1645 status = 0; in ocfs2_rename()
1685 if (status) in ocfs2_rename()
1686 mlog_errno(status); in ocfs2_rename()
1688 return status; in ocfs2_rename()
1704 int virtual, blocks, status, i, bytes_left; in ocfs2_create_symlink_data() local
1717 status = -EIO; in ocfs2_create_symlink_data()
1718 mlog_errno(status); in ocfs2_create_symlink_data()
1724 status = -ENOMEM; in ocfs2_create_symlink_data()
1725 mlog_errno(status); in ocfs2_create_symlink_data()
1729 status = ocfs2_extent_map_get_blocks(inode, 0, &p_blkno, &p_blocks, in ocfs2_create_symlink_data()
1731 if (status < 0) { in ocfs2_create_symlink_data()
1732 mlog_errno(status); in ocfs2_create_symlink_data()
1740 status = -EIO; in ocfs2_create_symlink_data()
1741 mlog_errno(status); in ocfs2_create_symlink_data()
1751 status = -ENOMEM; in ocfs2_create_symlink_data()
1752 mlog_errno(status); in ocfs2_create_symlink_data()
1758 status = ocfs2_journal_access(handle, INODE_CACHE(inode), in ocfs2_create_symlink_data()
1761 if (status < 0) { in ocfs2_create_symlink_data()
1762 mlog_errno(status); in ocfs2_create_symlink_data()
1779 status = 0; in ocfs2_create_symlink_data()
1788 if (status) in ocfs2_create_symlink_data()
1789 mlog_errno(status); in ocfs2_create_symlink_data()
1790 return status; in ocfs2_create_symlink_data()
1798 int status, l, credits; in ocfs2_symlink() local
1826 status = dquot_initialize(dir); in ocfs2_symlink()
1827 if (status) { in ocfs2_symlink()
1828 mlog_errno(status); in ocfs2_symlink()
1840 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_symlink()
1841 if (status < 0) { in ocfs2_symlink()
1842 if (status != -ENOENT) in ocfs2_symlink()
1843 mlog_errno(status); in ocfs2_symlink()
1844 return status; in ocfs2_symlink()
1850 status = -ENOENT; in ocfs2_symlink()
1854 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_symlink()
1856 if (status) in ocfs2_symlink()
1859 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_symlink()
1862 if (status < 0) { in ocfs2_symlink()
1863 mlog_errno(status); in ocfs2_symlink()
1867 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_symlink()
1868 if (status < 0) { in ocfs2_symlink()
1869 if (status != -ENOSPC) in ocfs2_symlink()
1870 mlog_errno(status); in ocfs2_symlink()
1876 status = PTR_ERR(inode); in ocfs2_symlink()
1878 mlog_errno(status); in ocfs2_symlink()
1883 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_symlink()
1884 if (status) { in ocfs2_symlink()
1885 if (status == -EOPNOTSUPP) in ocfs2_symlink()
1888 mlog_errno(status); in ocfs2_symlink()
1895 status = ocfs2_calc_security_init(dir, &si, &want_clusters, in ocfs2_symlink()
1897 if (status < 0) { in ocfs2_symlink()
1898 mlog_errno(status); in ocfs2_symlink()
1907 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_symlink()
1908 if (status < 0) { in ocfs2_symlink()
1909 if (status != -ENOSPC) in ocfs2_symlink()
1910 mlog_errno(status); in ocfs2_symlink()
1916 status = PTR_ERR(handle); in ocfs2_symlink()
1918 mlog_errno(status); in ocfs2_symlink()
1926 status = dquot_alloc_inode(inode); in ocfs2_symlink()
1927 if (status) in ocfs2_symlink()
1936 status = ocfs2_mknod_locked(osb, dir, inode, in ocfs2_symlink()
1939 if (status < 0) { in ocfs2_symlink()
1940 mlog_errno(status); in ocfs2_symlink()
1952 status = dquot_alloc_space_nodirty(inode, in ocfs2_symlink()
1954 if (status) in ocfs2_symlink()
1958 status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, in ocfs2_symlink()
1962 if (status < 0) { in ocfs2_symlink()
1963 if (status != -ENOSPC && status != -EINTR) { in ocfs2_symlink()
1967 mlog_errno(status); in ocfs2_symlink()
1968 status = -ENOSPC; in ocfs2_symlink()
1981 status = ocfs2_mark_inode_dirty(handle, inode, new_fe_bh); in ocfs2_symlink()
1982 if (status < 0) { in ocfs2_symlink()
1983 mlog_errno(status); in ocfs2_symlink()
1988 status = ocfs2_create_symlink_data(osb, handle, inode, in ocfs2_symlink()
1990 if (status < 0) { in ocfs2_symlink()
1991 mlog_errno(status); in ocfs2_symlink()
1997 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_symlink()
1999 if (status < 0) { in ocfs2_symlink()
2000 mlog_errno(status); in ocfs2_symlink()
2010 status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); in ocfs2_symlink()
2011 if (status) { in ocfs2_symlink()
2012 mlog_errno(status); in ocfs2_symlink()
2018 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_symlink()
2021 if (status < 0) { in ocfs2_symlink()
2022 mlog_errno(status); in ocfs2_symlink()
2029 if (status < 0 && did_quota) in ocfs2_symlink()
2032 if (status < 0 && did_quota_inode) in ocfs2_symlink()
2035 if (status < 0 && fe) in ocfs2_symlink()
2054 if ((status < 0) && inode) { in ocfs2_symlink()
2063 if (status) in ocfs2_symlink()
2064 mlog_errno(status); in ocfs2_symlink()
2066 return status; in ocfs2_symlink()
2071 int status, namelen; in ocfs2_blkno_stringify() local
2077 status = namelen; in ocfs2_blkno_stringify()
2079 status = -EINVAL; in ocfs2_blkno_stringify()
2080 mlog_errno(status); in ocfs2_blkno_stringify()
2084 status = -EINVAL; in ocfs2_blkno_stringify()
2085 mlog_errno(status); in ocfs2_blkno_stringify()
2091 status = 0; in ocfs2_blkno_stringify()
2093 if (status < 0) in ocfs2_blkno_stringify()
2094 mlog_errno(status); in ocfs2_blkno_stringify()
2095 return status; in ocfs2_blkno_stringify()
2239 int status = 0; in ocfs2_orphan_add() local
2249 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh); in ocfs2_orphan_add()
2250 if (status < 0) { in ocfs2_orphan_add()
2251 mlog_errno(status); in ocfs2_orphan_add()
2255 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2259 if (status < 0) { in ocfs2_orphan_add()
2260 mlog_errno(status); in ocfs2_orphan_add()
2270 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2274 if (status < 0) { in ocfs2_orphan_add()
2275 mlog_errno(status); in ocfs2_orphan_add()
2287 status = __ocfs2_add_entry(handle, orphan_dir_inode, name, in ocfs2_orphan_add()
2291 if (status < 0) { in ocfs2_orphan_add()
2292 mlog_errno(status); in ocfs2_orphan_add()
2318 if (status < 0) { in ocfs2_orphan_add()
2327 return status; in ocfs2_orphan_add()
2340 int status = 0; in ocfs2_orphan_del() local
2344 status = snprintf(name, OCFS2_DIO_ORPHAN_PREFIX_LEN + 1, "%s", in ocfs2_orphan_del()
2346 if (status != OCFS2_DIO_ORPHAN_PREFIX_LEN) { in ocfs2_orphan_del()
2347 status = -EINVAL; in ocfs2_orphan_del()
2348 mlog_errno(status); in ocfs2_orphan_del()
2349 return status; in ocfs2_orphan_del()
2352 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, in ocfs2_orphan_del()
2355 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name); in ocfs2_orphan_del()
2356 if (status < 0) { in ocfs2_orphan_del()
2357 mlog_errno(status); in ocfs2_orphan_del()
2365 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_del()
2369 if (status < 0) { in ocfs2_orphan_del()
2370 mlog_errno(status); in ocfs2_orphan_del()
2375 status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode, in ocfs2_orphan_del()
2377 if (status) { in ocfs2_orphan_del()
2378 mlog_errno(status); in ocfs2_orphan_del()
2383 status = ocfs2_delete_entry(handle, orphan_dir_inode, &lookup); in ocfs2_orphan_del()
2384 if (status < 0) { in ocfs2_orphan_del()
2385 mlog_errno(status); in ocfs2_orphan_del()
2399 if (status) in ocfs2_orphan_del()
2400 mlog_errno(status); in ocfs2_orphan_del()
2401 return status; in ocfs2_orphan_del()
2502 int status, did_quota_inode = 0; in ocfs2_create_inode_in_orphan() local
2515 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_create_inode_in_orphan()
2516 if (status < 0) { in ocfs2_create_inode_in_orphan()
2517 if (status != -ENOENT) in ocfs2_create_inode_in_orphan()
2518 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2519 return status; in ocfs2_create_inode_in_orphan()
2522 status = ocfs2_prep_new_orphaned_file(dir, parent_di_bh, in ocfs2_create_inode_in_orphan()
2525 if (status < 0) { in ocfs2_create_inode_in_orphan()
2526 if (status != -ENOSPC) in ocfs2_create_inode_in_orphan()
2527 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2533 status = PTR_ERR(inode); in ocfs2_create_inode_in_orphan()
2535 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2541 status = PTR_ERR(handle); in ocfs2_create_inode_in_orphan()
2543 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2547 status = dquot_alloc_inode(inode); in ocfs2_create_inode_in_orphan()
2548 if (status) in ocfs2_create_inode_in_orphan()
2552 status = ocfs2_claim_new_inode_at_loc(handle, dir, inode_ac, in ocfs2_create_inode_in_orphan()
2555 if (status < 0) { in ocfs2_create_inode_in_orphan()
2556 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2562 status = __ocfs2_mknod_locked(dir, inode, in ocfs2_create_inode_in_orphan()
2566 if (status < 0) { in ocfs2_create_inode_in_orphan()
2567 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2571 status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, in ocfs2_create_inode_in_orphan()
2573 if (status < 0) { in ocfs2_create_inode_in_orphan()
2574 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2579 status = ocfs2_open_lock(inode); in ocfs2_create_inode_in_orphan()
2580 if (status < 0) in ocfs2_create_inode_in_orphan()
2581 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2585 if (status < 0 && did_quota_inode) in ocfs2_create_inode_in_orphan()
2597 if ((status < 0) && inode) { in ocfs2_create_inode_in_orphan()
2607 if (!status) in ocfs2_create_inode_in_orphan()
2614 return status; in ocfs2_create_inode_in_orphan()
2624 int status = 0; in ocfs2_add_inode_to_orphan() local
2628 status = ocfs2_inode_lock(inode, &di_bh, 1); in ocfs2_add_inode_to_orphan()
2629 if (status < 0) { in ocfs2_add_inode_to_orphan()
2630 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2640 status = ocfs2_truncate_file(inode, di_bh, i_size_read(inode)); in ocfs2_add_inode_to_orphan()
2641 if (status < 0) { in ocfs2_add_inode_to_orphan()
2642 if (status != -ENOSPC) in ocfs2_add_inode_to_orphan()
2643 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2647 status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0); in ocfs2_add_inode_to_orphan()
2648 if (status < 0) { in ocfs2_add_inode_to_orphan()
2649 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2654 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode, in ocfs2_add_inode_to_orphan()
2659 if (status < 0) { in ocfs2_add_inode_to_orphan()
2660 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2667 status = PTR_ERR(handle); in ocfs2_add_inode_to_orphan()
2671 status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name, in ocfs2_add_inode_to_orphan()
2673 if (status) in ocfs2_add_inode_to_orphan()
2674 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2690 return status; in ocfs2_add_inode_to_orphan()
2701 int status = 0; in ocfs2_del_inode_from_orphan() local
2707 status = -ENOENT; in ocfs2_del_inode_from_orphan()
2708 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2713 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_del_inode_from_orphan()
2714 if (status < 0) { in ocfs2_del_inode_from_orphan()
2717 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2724 status = PTR_ERR(handle); in ocfs2_del_inode_from_orphan()
2730 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, in ocfs2_del_inode_from_orphan()
2732 if (status < 0) { in ocfs2_del_inode_from_orphan()
2733 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2737 status = ocfs2_journal_access_di(handle, in ocfs2_del_inode_from_orphan()
2741 if (status < 0) { in ocfs2_del_inode_from_orphan()
2742 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2750 status = ocfs2_set_inode_size(handle, inode, di_bh, end); in ocfs2_del_inode_from_orphan()
2751 if (status) in ocfs2_del_inode_from_orphan()
2752 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2766 return status; in ocfs2_del_inode_from_orphan()
2773 int status = 0; in ocfs2_mv_orphaned_inode_to_new() local
2788 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2789 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2790 if (status != -ENOENT) in ocfs2_mv_orphaned_inode_to_new()
2791 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2792 return status; in ocfs2_mv_orphaned_inode_to_new()
2798 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2802 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mv_orphaned_inode_to_new()
2804 if (status) in ocfs2_mv_orphaned_inode_to_new()
2808 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh, 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()
2820 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2821 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2827 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2828 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2829 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2835 status = ocfs2_read_inode_block(inode, &di_bh); in ocfs2_mv_orphaned_inode_to_new()
2836 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2837 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2843 status = PTR_ERR(handle); in ocfs2_mv_orphaned_inode_to_new()
2845 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2849 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in ocfs2_mv_orphaned_inode_to_new()
2851 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2852 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2856 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, in ocfs2_mv_orphaned_inode_to_new()
2858 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2859 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2871 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2874 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2875 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2879 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2881 if (status) { in ocfs2_mv_orphaned_inode_to_new()
2882 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2887 status = 0; in ocfs2_mv_orphaned_inode_to_new()
2904 if (status) in ocfs2_mv_orphaned_inode_to_new()
2905 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2907 return status; in ocfs2_mv_orphaned_inode_to_new()