Lines Matching full: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()
448 if (status < 0 && S_ISDIR(mode)) { in ocfs2_mknod()
454 if (status < 0 && did_quota_inode) in ocfs2_mknod()
483 if ((status < 0) && inode) { in ocfs2_mknod()
492 if (status) in ocfs2_mknod()
493 mlog_errno(status); in ocfs2_mknod()
495 return status; in ocfs2_mknod()
507 int status = 0; in __ocfs2_mknod_locked() local
528 status = -ENOMEM; in __ocfs2_mknod_locked()
529 mlog_errno(status); in __ocfs2_mknod_locked()
534 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_mknod_locked()
537 if (status < 0) { in __ocfs2_mknod_locked()
538 mlog_errno(status); in __ocfs2_mknod_locked()
591 status = ocfs2_create_new_inode_locks(inode); in __ocfs2_mknod_locked()
592 if (status < 0) in __ocfs2_mknod_locked()
593 mlog_errno(status); in __ocfs2_mknod_locked()
599 if (status < 0) { in __ocfs2_mknod_locked()
606 if (status) in __ocfs2_mknod_locked()
607 mlog_errno(status); in __ocfs2_mknod_locked()
608 return status; in __ocfs2_mknod_locked()
620 int status = 0; in ocfs2_mknod_locked() local
626 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh, in ocfs2_mknod_locked()
629 if (status < 0) { in ocfs2_mknod_locked()
630 mlog_errno(status); in ocfs2_mknod_locked()
631 return status; in ocfs2_mknod_locked()
634 status = __ocfs2_mknod_locked(dir, inode, dev, new_fe_bh, in ocfs2_mknod_locked()
637 if (status < 0) { in ocfs2_mknod_locked()
645 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()
1204 int status = 0, rename_lock = 0, parents_locked = 0, target_exists = 0; in ocfs2_rename() local
1237 status = dquot_initialize(old_dir); in ocfs2_rename()
1238 if (status) { in ocfs2_rename()
1239 mlog_errno(status); in ocfs2_rename()
1242 status = dquot_initialize(new_dir); in ocfs2_rename()
1243 if (status) { in ocfs2_rename()
1244 mlog_errno(status); in ocfs2_rename()
1267 status = ocfs2_rename_lock(osb); in ocfs2_rename()
1268 if (status < 0) { in ocfs2_rename()
1269 mlog_errno(status); in ocfs2_rename()
1276 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino, in ocfs2_rename()
1278 if (status < 0) { in ocfs2_rename()
1279 mlog_errno(status); in ocfs2_rename()
1281 } else if (status == 1) { in ocfs2_rename()
1282 status = -EPERM; in ocfs2_rename()
1291 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir, in ocfs2_rename()
1293 if (status < 0) { in ocfs2_rename()
1294 mlog_errno(status); in ocfs2_rename()
1300 status = -EACCES; in ocfs2_rename()
1312 status = -EIO; in ocfs2_rename()
1323 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1, in ocfs2_rename()
1325 if (status < 0) { in ocfs2_rename()
1326 if (status != -ENOENT) in ocfs2_rename()
1327 mlog_errno(status); in ocfs2_rename()
1332 status = ocfs2_remote_dentry_delete(old_dentry); in ocfs2_rename()
1333 if (status < 0) { in ocfs2_rename()
1334 mlog_errno(status); in ocfs2_rename()
1342 status = ocfs2_find_files_on_disk("..", 2, &old_inode_parent, in ocfs2_rename()
1345 if (status) { in ocfs2_rename()
1346 status = -EIO; in ocfs2_rename()
1351 status = -EIO; in ocfs2_rename()
1357 status = -EMLINK; in ocfs2_rename()
1362 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name, in ocfs2_rename()
1365 if (status) { in ocfs2_rename()
1366 status = -ENOENT; in ocfs2_rename()
1377 status = -ENOENT; in ocfs2_rename()
1383 status = ocfs2_find_files_on_disk(new_dentry->d_name.name, in ocfs2_rename()
1389 if ((status < 0) && (status != -ENOENT)) { in ocfs2_rename()
1392 mlog_errno(status); in ocfs2_rename()
1395 if (status == 0) in ocfs2_rename()
1405 status = -ENOENT; in ocfs2_rename()
1418 status = -EACCES; in ocfs2_rename()
1426 status = -EACCES; in ocfs2_rename()
1435 status = ocfs2_inode_lock(new_inode, &newfe_bh, 1); in ocfs2_rename()
1436 if (status < 0) { in ocfs2_rename()
1437 if (status != -ENOENT) in ocfs2_rename()
1438 mlog_errno(status); in ocfs2_rename()
1443 status = ocfs2_remote_dentry_delete(new_dentry); in ocfs2_rename()
1444 if (status < 0) { in ocfs2_rename()
1445 mlog_errno(status); in ocfs2_rename()
1456 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_rename()
1460 if (status < 0) { in ocfs2_rename()
1461 mlog_errno(status); in ocfs2_rename()
1469 status = ocfs2_check_dir_for_entry(new_dir, in ocfs2_rename()
1472 if (status) in ocfs2_rename()
1475 status = ocfs2_prepare_dir_for_insert(osb, new_dir, new_dir_bh, in ocfs2_rename()
1479 if (status < 0) { in ocfs2_rename()
1480 mlog_errno(status); in ocfs2_rename()
1487 status = PTR_ERR(handle); in ocfs2_rename()
1489 mlog_errno(status); in ocfs2_rename()
1497 status = -ENOTEMPTY; in ocfs2_rename()
1501 status = ocfs2_journal_access_di(handle, INODE_CACHE(new_inode), in ocfs2_rename()
1504 if (status < 0) { in ocfs2_rename()
1505 mlog_errno(status); in ocfs2_rename()
1510 status = ocfs2_update_entry(new_dir, handle, &target_lookup_res, in ocfs2_rename()
1512 if (status < 0) { in ocfs2_rename()
1513 mlog_errno(status); in ocfs2_rename()
1524 status = ocfs2_orphan_add(osb, handle, new_inode, in ocfs2_rename()
1527 if (status < 0) { in ocfs2_rename()
1528 mlog_errno(status); in ocfs2_rename()
1534 status = ocfs2_add_entry(handle, new_dentry, old_inode, in ocfs2_rename()
1542 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode), in ocfs2_rename()
1545 if (status >= 0) { in ocfs2_rename()
1552 mlog_errno(status); in ocfs2_rename()
1561 status = ocfs2_find_entry(old_dentry->d_name.name, in ocfs2_rename()
1564 if (status) { in ocfs2_rename()
1574 status = ocfs2_delete_entry(handle, old_dir, &old_entry_lookup); in ocfs2_rename()
1575 if (status < 0) { in ocfs2_rename()
1576 mlog_errno(status); in ocfs2_rename()
1593 status = ocfs2_update_entry(old_inode, handle, in ocfs2_rename()
1629 status = ocfs2_journal_access_di(handle, in ocfs2_rename()
1639 status = 0; in ocfs2_rename()
1679 if (status) in ocfs2_rename()
1680 mlog_errno(status); in ocfs2_rename()
1682 return status; in ocfs2_rename()
1698 int virtual, blocks, status, i, bytes_left; in ocfs2_create_symlink_data() local
1711 status = -EIO; in ocfs2_create_symlink_data()
1712 mlog_errno(status); in ocfs2_create_symlink_data()
1718 status = -ENOMEM; in ocfs2_create_symlink_data()
1719 mlog_errno(status); in ocfs2_create_symlink_data()
1723 status = ocfs2_extent_map_get_blocks(inode, 0, &p_blkno, &p_blocks, in ocfs2_create_symlink_data()
1725 if (status < 0) { in ocfs2_create_symlink_data()
1726 mlog_errno(status); in ocfs2_create_symlink_data()
1734 status = -EIO; in ocfs2_create_symlink_data()
1735 mlog_errno(status); in ocfs2_create_symlink_data()
1745 status = -ENOMEM; in ocfs2_create_symlink_data()
1746 mlog_errno(status); in ocfs2_create_symlink_data()
1752 status = ocfs2_journal_access(handle, INODE_CACHE(inode), in ocfs2_create_symlink_data()
1755 if (status < 0) { in ocfs2_create_symlink_data()
1756 mlog_errno(status); in ocfs2_create_symlink_data()
1773 status = 0; in ocfs2_create_symlink_data()
1782 if (status) in ocfs2_create_symlink_data()
1783 mlog_errno(status); in ocfs2_create_symlink_data()
1784 return status; in ocfs2_create_symlink_data()
1791 int status, l, credits; in ocfs2_symlink() local
1818 status = dquot_initialize(dir); in ocfs2_symlink()
1819 if (status) { in ocfs2_symlink()
1820 mlog_errno(status); in ocfs2_symlink()
1832 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_symlink()
1833 if (status < 0) { in ocfs2_symlink()
1834 if (status != -ENOENT) in ocfs2_symlink()
1835 mlog_errno(status); in ocfs2_symlink()
1836 return status; in ocfs2_symlink()
1842 status = -ENOENT; in ocfs2_symlink()
1846 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_symlink()
1848 if (status) in ocfs2_symlink()
1851 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_symlink()
1854 if (status < 0) { in ocfs2_symlink()
1855 mlog_errno(status); in ocfs2_symlink()
1859 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_symlink()
1860 if (status < 0) { in ocfs2_symlink()
1861 if (status != -ENOSPC) in ocfs2_symlink()
1862 mlog_errno(status); in ocfs2_symlink()
1868 status = PTR_ERR(inode); in ocfs2_symlink()
1870 mlog_errno(status); in ocfs2_symlink()
1875 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_symlink()
1876 if (status) { in ocfs2_symlink()
1877 if (status == -EOPNOTSUPP) in ocfs2_symlink()
1880 mlog_errno(status); in ocfs2_symlink()
1887 status = ocfs2_calc_security_init(dir, &si, &want_clusters, in ocfs2_symlink()
1889 if (status < 0) { in ocfs2_symlink()
1890 mlog_errno(status); in ocfs2_symlink()
1899 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_symlink()
1900 if (status < 0) { in ocfs2_symlink()
1901 if (status != -ENOSPC) in ocfs2_symlink()
1902 mlog_errno(status); in ocfs2_symlink()
1908 status = PTR_ERR(handle); in ocfs2_symlink()
1910 mlog_errno(status); in ocfs2_symlink()
1918 status = dquot_alloc_inode(inode); in ocfs2_symlink()
1919 if (status) in ocfs2_symlink()
1928 status = ocfs2_mknod_locked(osb, dir, inode, in ocfs2_symlink()
1931 if (status < 0) { in ocfs2_symlink()
1932 mlog_errno(status); in ocfs2_symlink()
1944 status = dquot_alloc_space_nodirty(inode, in ocfs2_symlink()
1946 if (status) in ocfs2_symlink()
1950 status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, in ocfs2_symlink()
1954 if (status < 0) { in ocfs2_symlink()
1955 if (status != -ENOSPC && status != -EINTR) { in ocfs2_symlink()
1959 mlog_errno(status); in ocfs2_symlink()
1960 status = -ENOSPC; in ocfs2_symlink()
1973 status = ocfs2_mark_inode_dirty(handle, inode, new_fe_bh); in ocfs2_symlink()
1974 if (status < 0) { in ocfs2_symlink()
1975 mlog_errno(status); in ocfs2_symlink()
1980 status = ocfs2_create_symlink_data(osb, handle, inode, in ocfs2_symlink()
1982 if (status < 0) { in ocfs2_symlink()
1983 mlog_errno(status); in ocfs2_symlink()
1989 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_symlink()
1991 if (status < 0) { in ocfs2_symlink()
1992 mlog_errno(status); in ocfs2_symlink()
2002 status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); in ocfs2_symlink()
2003 if (status) { in ocfs2_symlink()
2004 mlog_errno(status); in ocfs2_symlink()
2010 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_symlink()
2013 if (status < 0) { in ocfs2_symlink()
2014 mlog_errno(status); in ocfs2_symlink()
2021 if (status < 0 && did_quota) in ocfs2_symlink()
2024 if (status < 0 && did_quota_inode) in ocfs2_symlink()
2043 if ((status < 0) && inode) { in ocfs2_symlink()
2052 if (status) in ocfs2_symlink()
2053 mlog_errno(status); in ocfs2_symlink()
2055 return status; in ocfs2_symlink()
2060 int status, namelen; in ocfs2_blkno_stringify() local
2066 status = namelen; in ocfs2_blkno_stringify()
2068 status = -EINVAL; in ocfs2_blkno_stringify()
2069 mlog_errno(status); in ocfs2_blkno_stringify()
2073 status = -EINVAL; in ocfs2_blkno_stringify()
2074 mlog_errno(status); in ocfs2_blkno_stringify()
2080 status = 0; in ocfs2_blkno_stringify()
2082 if (status < 0) in ocfs2_blkno_stringify()
2083 mlog_errno(status); in ocfs2_blkno_stringify()
2084 return status; in ocfs2_blkno_stringify()
2228 int status = 0; in ocfs2_orphan_add() local
2238 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh); in ocfs2_orphan_add()
2239 if (status < 0) { in ocfs2_orphan_add()
2240 mlog_errno(status); in ocfs2_orphan_add()
2244 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2248 if (status < 0) { in ocfs2_orphan_add()
2249 mlog_errno(status); in ocfs2_orphan_add()
2259 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2263 if (status < 0) { in ocfs2_orphan_add()
2264 mlog_errno(status); in ocfs2_orphan_add()
2276 status = __ocfs2_add_entry(handle, orphan_dir_inode, name, in ocfs2_orphan_add()
2280 if (status < 0) { in ocfs2_orphan_add()
2281 mlog_errno(status); in ocfs2_orphan_add()
2307 if (status < 0) { in ocfs2_orphan_add()
2316 return status; in ocfs2_orphan_add()
2329 int status = 0; in ocfs2_orphan_del() local
2333 status = snprintf(name, OCFS2_DIO_ORPHAN_PREFIX_LEN + 1, "%s", in ocfs2_orphan_del()
2335 if (status != OCFS2_DIO_ORPHAN_PREFIX_LEN) { in ocfs2_orphan_del()
2336 status = -EINVAL; in ocfs2_orphan_del()
2337 mlog_errno(status); in ocfs2_orphan_del()
2338 return status; in ocfs2_orphan_del()
2341 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, in ocfs2_orphan_del()
2344 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name); in ocfs2_orphan_del()
2345 if (status < 0) { in ocfs2_orphan_del()
2346 mlog_errno(status); in ocfs2_orphan_del()
2354 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_del()
2358 if (status < 0) { in ocfs2_orphan_del()
2359 mlog_errno(status); in ocfs2_orphan_del()
2364 status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode, in ocfs2_orphan_del()
2366 if (status) { in ocfs2_orphan_del()
2367 mlog_errno(status); in ocfs2_orphan_del()
2372 status = ocfs2_delete_entry(handle, orphan_dir_inode, &lookup); in ocfs2_orphan_del()
2373 if (status < 0) { in ocfs2_orphan_del()
2374 mlog_errno(status); in ocfs2_orphan_del()
2388 if (status) in ocfs2_orphan_del()
2389 mlog_errno(status); in ocfs2_orphan_del()
2390 return status; in ocfs2_orphan_del()
2491 int status, did_quota_inode = 0; in ocfs2_create_inode_in_orphan() local
2504 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_create_inode_in_orphan()
2505 if (status < 0) { in ocfs2_create_inode_in_orphan()
2506 if (status != -ENOENT) in ocfs2_create_inode_in_orphan()
2507 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2508 return status; in ocfs2_create_inode_in_orphan()
2511 status = ocfs2_prep_new_orphaned_file(dir, parent_di_bh, in ocfs2_create_inode_in_orphan()
2514 if (status < 0) { in ocfs2_create_inode_in_orphan()
2515 if (status != -ENOSPC) in ocfs2_create_inode_in_orphan()
2516 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2522 status = PTR_ERR(inode); in ocfs2_create_inode_in_orphan()
2524 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2530 status = PTR_ERR(handle); in ocfs2_create_inode_in_orphan()
2532 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2536 status = dquot_alloc_inode(inode); in ocfs2_create_inode_in_orphan()
2537 if (status) in ocfs2_create_inode_in_orphan()
2541 status = ocfs2_claim_new_inode_at_loc(handle, dir, inode_ac, in ocfs2_create_inode_in_orphan()
2544 if (status < 0) { in ocfs2_create_inode_in_orphan()
2545 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2551 status = __ocfs2_mknod_locked(dir, inode, 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()
2560 status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, in ocfs2_create_inode_in_orphan()
2562 if (status < 0) { in ocfs2_create_inode_in_orphan()
2563 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2568 status = ocfs2_open_lock(inode); in ocfs2_create_inode_in_orphan()
2569 if (status < 0) in ocfs2_create_inode_in_orphan()
2570 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2574 if (status < 0 && did_quota_inode) in ocfs2_create_inode_in_orphan()
2586 if ((status < 0) && inode) { in ocfs2_create_inode_in_orphan()
2596 if (!status) in ocfs2_create_inode_in_orphan()
2603 return status; in ocfs2_create_inode_in_orphan()
2613 int status = 0; in ocfs2_add_inode_to_orphan() local
2617 status = ocfs2_inode_lock(inode, &di_bh, 1); in ocfs2_add_inode_to_orphan()
2618 if (status < 0) { in ocfs2_add_inode_to_orphan()
2619 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2629 status = ocfs2_truncate_file(inode, di_bh, i_size_read(inode)); in ocfs2_add_inode_to_orphan()
2630 if (status < 0) { in ocfs2_add_inode_to_orphan()
2631 if (status != -ENOSPC) in ocfs2_add_inode_to_orphan()
2632 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2636 status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0); in ocfs2_add_inode_to_orphan()
2637 if (status < 0) { in ocfs2_add_inode_to_orphan()
2638 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2643 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode, 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()
2656 status = PTR_ERR(handle); in ocfs2_add_inode_to_orphan()
2660 status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name, in ocfs2_add_inode_to_orphan()
2662 if (status) in ocfs2_add_inode_to_orphan()
2663 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2679 return status; in ocfs2_add_inode_to_orphan()
2690 int status = 0; in ocfs2_del_inode_from_orphan() local
2696 status = -ENOENT; in ocfs2_del_inode_from_orphan()
2697 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2702 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_del_inode_from_orphan()
2703 if (status < 0) { in ocfs2_del_inode_from_orphan()
2706 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2713 status = PTR_ERR(handle); in ocfs2_del_inode_from_orphan()
2719 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, in ocfs2_del_inode_from_orphan()
2721 if (status < 0) { in ocfs2_del_inode_from_orphan()
2722 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2726 status = ocfs2_journal_access_di(handle, in ocfs2_del_inode_from_orphan()
2730 if (status < 0) { in ocfs2_del_inode_from_orphan()
2731 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2739 status = ocfs2_set_inode_size(handle, inode, di_bh, end); in ocfs2_del_inode_from_orphan()
2740 if (status) in ocfs2_del_inode_from_orphan()
2741 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2755 return status; in ocfs2_del_inode_from_orphan()
2762 int status = 0; in ocfs2_mv_orphaned_inode_to_new() local
2777 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2778 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2779 if (status != -ENOENT) in ocfs2_mv_orphaned_inode_to_new()
2780 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2781 return status; in ocfs2_mv_orphaned_inode_to_new()
2787 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2791 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mv_orphaned_inode_to_new()
2793 if (status) in ocfs2_mv_orphaned_inode_to_new()
2797 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh, in ocfs2_mv_orphaned_inode_to_new()
2800 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2801 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2809 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2810 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2816 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2817 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2818 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2824 status = ocfs2_read_inode_block(inode, &di_bh); in ocfs2_mv_orphaned_inode_to_new()
2825 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2826 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2832 status = PTR_ERR(handle); in ocfs2_mv_orphaned_inode_to_new()
2834 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2838 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in ocfs2_mv_orphaned_inode_to_new()
2840 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2841 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2845 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, in ocfs2_mv_orphaned_inode_to_new()
2847 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2848 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2860 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2863 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2864 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2868 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2870 if (status) { in ocfs2_mv_orphaned_inode_to_new()
2871 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2876 status = 0; in ocfs2_mv_orphaned_inode_to_new()
2893 if (status) in ocfs2_mv_orphaned_inode_to_new()
2894 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2896 return status; in ocfs2_mv_orphaned_inode_to_new()