Lines Matching full: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
257 status = dquot_initialize(dir); in ocfs2_mknod()
258 if (status) { in ocfs2_mknod()
259 mlog_errno(status); in ocfs2_mknod()
260 return status; in ocfs2_mknod()
266 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_mknod()
267 if (status < 0) { in ocfs2_mknod()
268 if (status != -ENOENT) in ocfs2_mknod()
269 mlog_errno(status); in ocfs2_mknod()
270 return status; in ocfs2_mknod()
274 status = -EMLINK; in ocfs2_mknod()
281 status = -ENOENT; in ocfs2_mknod()
285 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mknod()
287 if (status) in ocfs2_mknod()
291 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_mknod()
294 if (status < 0) { in ocfs2_mknod()
295 mlog_errno(status); in ocfs2_mknod()
300 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_mknod()
301 if (status < 0) { in ocfs2_mknod()
302 if (status != -ENOSPC) in ocfs2_mknod()
303 mlog_errno(status); in ocfs2_mknod()
309 status = PTR_ERR(inode); in ocfs2_mknod()
311 mlog_errno(status); in ocfs2_mknod()
316 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_mknod()
317 if (status) { in ocfs2_mknod()
318 if (status == -EOPNOTSUPP) in ocfs2_mknod()
321 mlog_errno(status); in ocfs2_mknod()
327 status = ocfs2_calc_xattr_init(dir, parent_fe_bh, mode, in ocfs2_mknod()
330 if (status < 0) { in ocfs2_mknod()
331 mlog_errno(status); in ocfs2_mknod()
344 status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac); in ocfs2_mknod()
345 if (status < 0) { in ocfs2_mknod()
346 if (status != -ENOSPC) in ocfs2_mknod()
347 mlog_errno(status); in ocfs2_mknod()
351 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_mknod()
352 if (status < 0) { in ocfs2_mknod()
353 if (status != -ENOSPC) in ocfs2_mknod()
354 mlog_errno(status); in ocfs2_mknod()
362 status = PTR_ERR(handle); in ocfs2_mknod()
364 mlog_errno(status); in ocfs2_mknod()
372 status = dquot_alloc_inode(inode); in ocfs2_mknod()
373 if (status) in ocfs2_mknod()
378 status = ocfs2_mknod_locked(osb, dir, inode, dev, in ocfs2_mknod()
381 if (status < 0) { in ocfs2_mknod()
382 mlog_errno(status); in ocfs2_mknod()
388 status = ocfs2_fill_new_dir(osb, handle, dir, inode, in ocfs2_mknod()
390 if (status < 0) { in ocfs2_mknod()
391 mlog_errno(status); in ocfs2_mknod()
395 status = ocfs2_journal_access_di(handle, INODE_CACHE(dir), in ocfs2_mknod()
398 if (status < 0) { in ocfs2_mknod()
399 mlog_errno(status); in ocfs2_mknod()
407 status = ocfs2_init_acl(handle, inode, dir, new_fe_bh, parent_fe_bh, in ocfs2_mknod()
410 if (status < 0) { in ocfs2_mknod()
411 mlog_errno(status); in ocfs2_mknod()
416 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_mknod()
418 if (status < 0) { in ocfs2_mknod()
419 mlog_errno(status); in ocfs2_mknod()
429 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mknod()
431 if (status) { in ocfs2_mknod()
432 mlog_errno(status); in ocfs2_mknod()
438 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mknod()
441 if (status < 0) { in ocfs2_mknod()
442 mlog_errno(status); in ocfs2_mknod()
448 status = 0; in ocfs2_mknod()
451 if (status < 0 && S_ISDIR(mode)) { in ocfs2_mknod()
457 if (status < 0 && did_quota_inode) in ocfs2_mknod()
460 if (status < 0 && fe) in ocfs2_mknod()
489 if ((status < 0) && inode) { in ocfs2_mknod()
498 if (status) in ocfs2_mknod()
499 mlog_errno(status); in ocfs2_mknod()
501 return status; in ocfs2_mknod()
513 int status = 0; in __ocfs2_mknod_locked() local
534 status = -ENOMEM; in __ocfs2_mknod_locked()
535 mlog_errno(status); in __ocfs2_mknod_locked()
540 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in __ocfs2_mknod_locked()
543 if (status < 0) { in __ocfs2_mknod_locked()
544 mlog_errno(status); in __ocfs2_mknod_locked()
597 status = ocfs2_create_new_inode_locks(inode); in __ocfs2_mknod_locked()
598 if (status < 0) in __ocfs2_mknod_locked()
599 mlog_errno(status); in __ocfs2_mknod_locked()
605 if (status < 0) { in __ocfs2_mknod_locked()
612 if (status) in __ocfs2_mknod_locked()
613 mlog_errno(status); in __ocfs2_mknod_locked()
614 return status; in __ocfs2_mknod_locked()
626 int status = 0; in ocfs2_mknod_locked() local
632 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh, in ocfs2_mknod_locked()
635 if (status < 0) { in ocfs2_mknod_locked()
636 mlog_errno(status); in ocfs2_mknod_locked()
637 return status; in ocfs2_mknod_locked()
874 int status; in ocfs2_unlink() local
894 status = dquot_initialize(dir); in ocfs2_unlink()
895 if (status) { in ocfs2_unlink()
896 mlog_errno(status); in ocfs2_unlink()
897 return status; in ocfs2_unlink()
905 status = ocfs2_inode_lock_nested(dir, &parent_node_bh, 1, in ocfs2_unlink()
907 if (status < 0) { in ocfs2_unlink()
908 if (status != -ENOENT) in ocfs2_unlink()
909 mlog_errno(status); in ocfs2_unlink()
910 return status; in ocfs2_unlink()
913 status = ocfs2_find_files_on_disk(dentry->d_name.name, in ocfs2_unlink()
916 if (status < 0) { in ocfs2_unlink()
917 if (status != -ENOENT) in ocfs2_unlink()
918 mlog_errno(status); in ocfs2_unlink()
923 status = -ENOENT; in ocfs2_unlink()
932 status = ocfs2_inode_lock(inode, &fe_bh, 1); in ocfs2_unlink()
933 if (status < 0) { in ocfs2_unlink()
934 if (status != -ENOENT) in ocfs2_unlink()
935 mlog_errno(status); in ocfs2_unlink()
942 status = -ENOTEMPTY; in ocfs2_unlink()
947 status = ocfs2_remote_dentry_delete(dentry); in ocfs2_unlink()
948 if (status < 0) { in ocfs2_unlink()
951 mlog_errno(status); in ocfs2_unlink()
956 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir, in ocfs2_unlink()
960 if (status < 0) { in ocfs2_unlink()
961 mlog_errno(status); in ocfs2_unlink()
969 status = PTR_ERR(handle); in ocfs2_unlink()
971 mlog_errno(status); in ocfs2_unlink()
975 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), fe_bh, in ocfs2_unlink()
977 if (status < 0) { in ocfs2_unlink()
978 mlog_errno(status); in ocfs2_unlink()
985 status = ocfs2_delete_entry(handle, dir, &lookup); in ocfs2_unlink()
986 if (status < 0) { in ocfs2_unlink()
987 mlog_errno(status); in ocfs2_unlink()
1001 status = ocfs2_mark_inode_dirty(handle, dir, parent_node_bh); in ocfs2_unlink()
1002 if (status < 0) { in ocfs2_unlink()
1003 mlog_errno(status); in ocfs2_unlink()
1010 status = ocfs2_orphan_add(osb, handle, inode, fe_bh, in ocfs2_unlink()
1012 if (status < 0) in ocfs2_unlink()
1013 mlog_errno(status); in ocfs2_unlink()
1038 if (status && (status != -ENOTEMPTY) && (status != -ENOENT)) in ocfs2_unlink()
1039 mlog_errno(status); in ocfs2_unlink()
1041 return status; in ocfs2_unlink()
1114 int status; in ocfs2_double_lock() local
1133 status = inode1_is_ancestor; in ocfs2_double_lock()
1140 status = inode2_is_ancestor; in ocfs2_double_lock()
1152 status = ocfs2_inode_lock_nested(inode2, bh2, 1, in ocfs2_double_lock()
1154 if (status < 0) { in ocfs2_double_lock()
1155 if (status != -ENOENT) in ocfs2_double_lock()
1156 mlog_errno(status); in ocfs2_double_lock()
1162 status = ocfs2_inode_lock_nested(inode1, bh1, 1, in ocfs2_double_lock()
1164 if (status < 0) { in ocfs2_double_lock()
1175 if (status != -ENOENT) in ocfs2_double_lock()
1176 mlog_errno(status); in ocfs2_double_lock()
1184 if (status) in ocfs2_double_lock()
1185 mlog_errno(status); in ocfs2_double_lock()
1186 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()
1792 int status, l, credits; in ocfs2_symlink() local
1819 status = dquot_initialize(dir); in ocfs2_symlink()
1820 if (status) { in ocfs2_symlink()
1821 mlog_errno(status); in ocfs2_symlink()
1833 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1); in ocfs2_symlink()
1834 if (status < 0) { in ocfs2_symlink()
1835 if (status != -ENOENT) in ocfs2_symlink()
1836 mlog_errno(status); in ocfs2_symlink()
1837 return status; in ocfs2_symlink()
1843 status = -ENOENT; in ocfs2_symlink()
1847 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_symlink()
1849 if (status) in ocfs2_symlink()
1852 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh, in ocfs2_symlink()
1855 if (status < 0) { in ocfs2_symlink()
1856 mlog_errno(status); in ocfs2_symlink()
1860 status = ocfs2_reserve_new_inode(osb, &inode_ac); in ocfs2_symlink()
1861 if (status < 0) { in ocfs2_symlink()
1862 if (status != -ENOSPC) in ocfs2_symlink()
1863 mlog_errno(status); in ocfs2_symlink()
1869 status = PTR_ERR(inode); in ocfs2_symlink()
1871 mlog_errno(status); in ocfs2_symlink()
1876 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si); in ocfs2_symlink()
1877 if (status) { in ocfs2_symlink()
1878 if (status == -EOPNOTSUPP) in ocfs2_symlink()
1881 mlog_errno(status); in ocfs2_symlink()
1888 status = ocfs2_calc_security_init(dir, &si, &want_clusters, in ocfs2_symlink()
1890 if (status < 0) { in ocfs2_symlink()
1891 mlog_errno(status); in ocfs2_symlink()
1900 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac); in ocfs2_symlink()
1901 if (status < 0) { in ocfs2_symlink()
1902 if (status != -ENOSPC) in ocfs2_symlink()
1903 mlog_errno(status); in ocfs2_symlink()
1909 status = PTR_ERR(handle); in ocfs2_symlink()
1911 mlog_errno(status); in ocfs2_symlink()
1919 status = dquot_alloc_inode(inode); in ocfs2_symlink()
1920 if (status) in ocfs2_symlink()
1929 status = ocfs2_mknod_locked(osb, dir, inode, in ocfs2_symlink()
1932 if (status < 0) { in ocfs2_symlink()
1933 mlog_errno(status); in ocfs2_symlink()
1945 status = dquot_alloc_space_nodirty(inode, in ocfs2_symlink()
1947 if (status) in ocfs2_symlink()
1951 status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, in ocfs2_symlink()
1955 if (status < 0) { in ocfs2_symlink()
1956 if (status != -ENOSPC && status != -EINTR) { in ocfs2_symlink()
1960 mlog_errno(status); in ocfs2_symlink()
1961 status = -ENOSPC; in ocfs2_symlink()
1974 status = ocfs2_mark_inode_dirty(handle, inode, new_fe_bh); in ocfs2_symlink()
1975 if (status < 0) { in ocfs2_symlink()
1976 mlog_errno(status); in ocfs2_symlink()
1981 status = ocfs2_create_symlink_data(osb, handle, inode, in ocfs2_symlink()
1983 if (status < 0) { in ocfs2_symlink()
1984 mlog_errno(status); in ocfs2_symlink()
1990 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si, in ocfs2_symlink()
1992 if (status < 0) { in ocfs2_symlink()
1993 mlog_errno(status); in ocfs2_symlink()
2003 status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); in ocfs2_symlink()
2004 if (status) { in ocfs2_symlink()
2005 mlog_errno(status); in ocfs2_symlink()
2011 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_symlink()
2014 if (status < 0) { in ocfs2_symlink()
2015 mlog_errno(status); in ocfs2_symlink()
2022 if (status < 0 && did_quota) in ocfs2_symlink()
2025 if (status < 0 && did_quota_inode) in ocfs2_symlink()
2028 if (status < 0 && fe) in ocfs2_symlink()
2047 if ((status < 0) && inode) { in ocfs2_symlink()
2056 if (status) in ocfs2_symlink()
2057 mlog_errno(status); in ocfs2_symlink()
2059 return status; in ocfs2_symlink()
2064 int status, namelen; in ocfs2_blkno_stringify() local
2070 status = namelen; in ocfs2_blkno_stringify()
2072 status = -EINVAL; in ocfs2_blkno_stringify()
2073 mlog_errno(status); in ocfs2_blkno_stringify()
2077 status = -EINVAL; in ocfs2_blkno_stringify()
2078 mlog_errno(status); in ocfs2_blkno_stringify()
2084 status = 0; in ocfs2_blkno_stringify()
2086 if (status < 0) in ocfs2_blkno_stringify()
2087 mlog_errno(status); in ocfs2_blkno_stringify()
2088 return status; in ocfs2_blkno_stringify()
2232 int status = 0; in ocfs2_orphan_add() local
2242 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh); in ocfs2_orphan_add()
2243 if (status < 0) { in ocfs2_orphan_add()
2244 mlog_errno(status); in ocfs2_orphan_add()
2248 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2252 if (status < 0) { in ocfs2_orphan_add()
2253 mlog_errno(status); in ocfs2_orphan_add()
2263 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_add()
2267 if (status < 0) { in ocfs2_orphan_add()
2268 mlog_errno(status); in ocfs2_orphan_add()
2280 status = __ocfs2_add_entry(handle, orphan_dir_inode, name, in ocfs2_orphan_add()
2284 if (status < 0) { in ocfs2_orphan_add()
2285 mlog_errno(status); in ocfs2_orphan_add()
2311 if (status < 0) { in ocfs2_orphan_add()
2320 return status; in ocfs2_orphan_add()
2333 int status = 0; in ocfs2_orphan_del() local
2337 status = snprintf(name, OCFS2_DIO_ORPHAN_PREFIX_LEN + 1, "%s", in ocfs2_orphan_del()
2339 if (status != OCFS2_DIO_ORPHAN_PREFIX_LEN) { in ocfs2_orphan_del()
2340 status = -EINVAL; in ocfs2_orphan_del()
2341 mlog_errno(status); in ocfs2_orphan_del()
2342 return status; in ocfs2_orphan_del()
2345 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, in ocfs2_orphan_del()
2348 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name); in ocfs2_orphan_del()
2349 if (status < 0) { in ocfs2_orphan_del()
2350 mlog_errno(status); in ocfs2_orphan_del()
2358 status = ocfs2_journal_access_di(handle, in ocfs2_orphan_del()
2362 if (status < 0) { in ocfs2_orphan_del()
2363 mlog_errno(status); in ocfs2_orphan_del()
2368 status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode, in ocfs2_orphan_del()
2370 if (status) { in ocfs2_orphan_del()
2371 mlog_errno(status); in ocfs2_orphan_del()
2376 status = ocfs2_delete_entry(handle, orphan_dir_inode, &lookup); in ocfs2_orphan_del()
2377 if (status < 0) { in ocfs2_orphan_del()
2378 mlog_errno(status); in ocfs2_orphan_del()
2392 if (status) in ocfs2_orphan_del()
2393 mlog_errno(status); in ocfs2_orphan_del()
2394 return status; in ocfs2_orphan_del()
2495 int status, did_quota_inode = 0; in ocfs2_create_inode_in_orphan() local
2508 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_create_inode_in_orphan()
2509 if (status < 0) { in ocfs2_create_inode_in_orphan()
2510 if (status != -ENOENT) in ocfs2_create_inode_in_orphan()
2511 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2512 return status; in ocfs2_create_inode_in_orphan()
2515 status = ocfs2_prep_new_orphaned_file(dir, parent_di_bh, in ocfs2_create_inode_in_orphan()
2518 if (status < 0) { in ocfs2_create_inode_in_orphan()
2519 if (status != -ENOSPC) in ocfs2_create_inode_in_orphan()
2520 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2526 status = PTR_ERR(inode); in ocfs2_create_inode_in_orphan()
2528 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2534 status = PTR_ERR(handle); in ocfs2_create_inode_in_orphan()
2536 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2540 status = dquot_alloc_inode(inode); in ocfs2_create_inode_in_orphan()
2541 if (status) in ocfs2_create_inode_in_orphan()
2545 status = ocfs2_claim_new_inode_at_loc(handle, dir, inode_ac, in ocfs2_create_inode_in_orphan()
2548 if (status < 0) { in ocfs2_create_inode_in_orphan()
2549 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2555 status = __ocfs2_mknod_locked(dir, inode, in ocfs2_create_inode_in_orphan()
2559 if (status < 0) { in ocfs2_create_inode_in_orphan()
2560 mlog_errno(status); in ocfs2_create_inode_in_orphan()
2564 status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, 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()
2572 status = ocfs2_open_lock(inode); 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()
2578 if (status < 0 && did_quota_inode) in ocfs2_create_inode_in_orphan()
2590 if ((status < 0) && inode) { in ocfs2_create_inode_in_orphan()
2600 if (!status) in ocfs2_create_inode_in_orphan()
2607 return status; in ocfs2_create_inode_in_orphan()
2617 int status = 0; in ocfs2_add_inode_to_orphan() local
2621 status = ocfs2_inode_lock(inode, &di_bh, 1); in ocfs2_add_inode_to_orphan()
2622 if (status < 0) { in ocfs2_add_inode_to_orphan()
2623 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2633 status = ocfs2_truncate_file(inode, di_bh, i_size_read(inode)); in ocfs2_add_inode_to_orphan()
2634 if (status < 0) { in ocfs2_add_inode_to_orphan()
2635 if (status != -ENOSPC) in ocfs2_add_inode_to_orphan()
2636 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2640 status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0); in ocfs2_add_inode_to_orphan()
2641 if (status < 0) { in ocfs2_add_inode_to_orphan()
2642 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2647 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode, in ocfs2_add_inode_to_orphan()
2652 if (status < 0) { in ocfs2_add_inode_to_orphan()
2653 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2660 status = PTR_ERR(handle); in ocfs2_add_inode_to_orphan()
2664 status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name, in ocfs2_add_inode_to_orphan()
2666 if (status) in ocfs2_add_inode_to_orphan()
2667 mlog_errno(status); in ocfs2_add_inode_to_orphan()
2683 return status; in ocfs2_add_inode_to_orphan()
2694 int status = 0; in ocfs2_del_inode_from_orphan() local
2700 status = -ENOENT; in ocfs2_del_inode_from_orphan()
2701 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2706 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_del_inode_from_orphan()
2707 if (status < 0) { in ocfs2_del_inode_from_orphan()
2710 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2717 status = PTR_ERR(handle); in ocfs2_del_inode_from_orphan()
2723 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, in ocfs2_del_inode_from_orphan()
2725 if (status < 0) { in ocfs2_del_inode_from_orphan()
2726 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2730 status = ocfs2_journal_access_di(handle, in ocfs2_del_inode_from_orphan()
2734 if (status < 0) { in ocfs2_del_inode_from_orphan()
2735 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2743 status = ocfs2_set_inode_size(handle, inode, di_bh, end); in ocfs2_del_inode_from_orphan()
2744 if (status) in ocfs2_del_inode_from_orphan()
2745 mlog_errno(status); in ocfs2_del_inode_from_orphan()
2759 return status; in ocfs2_del_inode_from_orphan()
2766 int status = 0; in ocfs2_mv_orphaned_inode_to_new() local
2781 status = ocfs2_inode_lock(dir, &parent_di_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2782 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2783 if (status != -ENOENT) in ocfs2_mv_orphaned_inode_to_new()
2784 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2785 return status; in ocfs2_mv_orphaned_inode_to_new()
2791 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2795 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name, in ocfs2_mv_orphaned_inode_to_new()
2797 if (status) in ocfs2_mv_orphaned_inode_to_new()
2801 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh, in ocfs2_mv_orphaned_inode_to_new()
2804 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2805 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2813 status = -ENOENT; in ocfs2_mv_orphaned_inode_to_new()
2814 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2820 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); in ocfs2_mv_orphaned_inode_to_new()
2821 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2822 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2828 status = ocfs2_read_inode_block(inode, &di_bh); in ocfs2_mv_orphaned_inode_to_new()
2829 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2830 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2836 status = PTR_ERR(handle); in ocfs2_mv_orphaned_inode_to_new()
2838 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2842 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), in ocfs2_mv_orphaned_inode_to_new()
2844 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2845 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2849 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, 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()
2864 status = ocfs2_add_entry(handle, dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2867 if (status < 0) { in ocfs2_mv_orphaned_inode_to_new()
2868 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2872 status = ocfs2_dentry_attach_lock(dentry, inode, in ocfs2_mv_orphaned_inode_to_new()
2874 if (status) { in ocfs2_mv_orphaned_inode_to_new()
2875 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2880 status = 0; in ocfs2_mv_orphaned_inode_to_new()
2897 if (status) in ocfs2_mv_orphaned_inode_to_new()
2898 mlog_errno(status); in ocfs2_mv_orphaned_inode_to_new()
2900 return status; in ocfs2_mv_orphaned_inode_to_new()