Lines Matching refs:status

100 	int status;
115 status = ocfs2_inode_lock_nested(dir, NULL, 0, OI_LS_PARENT);
116 if (status < 0) {
117 if (status != -ENOENT)
118 mlog_errno(status);
119 ret = ERR_PTR(status);
123 status = ocfs2_lookup_ino_from_name(dir, dentry->d_name.name,
125 if (status < 0)
161 status = ocfs2_dentry_attach_lock(dentry, inode,
163 if (status) {
164 mlog_errno(status);
165 ret = ERR_PTR(status);
188 int status;
203 status = dquot_initialize(inode);
204 if (status)
205 return ERR_PTR(status);
230 int status = 0;
258 status = dquot_initialize(dir);
259 if (status) {
260 mlog_errno(status);
261 return status;
267 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1);
268 if (status < 0) {
269 if (status != -ENOENT)
270 mlog_errno(status);
271 return status;
275 status = -EMLINK;
282 status = -ENOENT;
286 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name,
288 if (status)
292 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh,
295 if (status < 0) {
296 mlog_errno(status);
301 status = ocfs2_reserve_new_inode(osb, &inode_ac);
302 if (status < 0) {
303 if (status != -ENOSPC)
304 mlog_errno(status);
310 status = PTR_ERR(inode);
312 mlog_errno(status);
317 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si);
318 if (status) {
319 if (status == -EOPNOTSUPP)
322 mlog_errno(status);
328 status = ocfs2_calc_xattr_init(dir, parent_fe_bh, mode,
331 if (status < 0) {
332 mlog_errno(status);
345 status = ocfs2_reserve_new_metadata_blocks(osb, want_meta, &meta_ac);
346 if (status < 0) {
347 if (status != -ENOSPC)
348 mlog_errno(status);
352 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac);
353 if (status < 0) {
354 if (status != -ENOSPC)
355 mlog_errno(status);
363 status = PTR_ERR(handle);
365 mlog_errno(status);
373 status = dquot_alloc_inode(inode);
374 if (status)
379 status = ocfs2_mknod_locked(osb, dir, inode, dev,
382 if (status < 0) {
383 mlog_errno(status);
389 status = ocfs2_fill_new_dir(osb, handle, dir, inode,
391 if (status < 0) {
392 mlog_errno(status);
396 status = ocfs2_journal_access_di(handle, INODE_CACHE(dir),
399 if (status < 0) {
400 mlog_errno(status);
408 status = ocfs2_init_acl(handle, inode, dir, new_fe_bh, parent_fe_bh,
411 if (status < 0) {
412 mlog_errno(status);
417 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si,
419 if (status < 0) {
420 mlog_errno(status);
430 status = ocfs2_dentry_attach_lock(dentry, inode,
432 if (status) {
433 mlog_errno(status);
439 status = ocfs2_add_entry(handle, dentry, inode,
442 if (status < 0) {
443 mlog_errno(status);
449 status = 0;
452 if (status < 0 && S_ISDIR(mode)) {
458 if (status < 0 && did_quota_inode)
461 if (status < 0 && fe)
490 if ((status < 0) && inode) {
499 if (status)
500 mlog_errno(status);
502 return status;
514 int status = 0;
535 status = -ENOMEM;
536 mlog_errno(status);
541 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode),
544 if (status < 0) {
545 mlog_errno(status);
598 status = ocfs2_create_new_inode_locks(inode);
599 if (status < 0)
600 mlog_errno(status);
606 if (status < 0) {
613 if (status)
614 mlog_errno(status);
615 return status;
627 int status = 0;
633 status = ocfs2_claim_new_inode(handle, dir, parent_fe_bh,
636 if (status < 0) {
637 mlog_errno(status);
638 return status;
873 int status;
893 status = dquot_initialize(dir);
894 if (status) {
895 mlog_errno(status);
896 return status;
904 status = ocfs2_inode_lock_nested(dir, &parent_node_bh, 1,
906 if (status < 0) {
907 if (status != -ENOENT)
908 mlog_errno(status);
909 return status;
912 status = ocfs2_find_files_on_disk(dentry->d_name.name,
915 if (status < 0) {
916 if (status != -ENOENT)
917 mlog_errno(status);
922 status = -ENOENT;
931 status = ocfs2_inode_lock(inode, &fe_bh, 1);
932 if (status < 0) {
933 if (status != -ENOENT)
934 mlog_errno(status);
941 status = -ENOTEMPTY;
946 status = ocfs2_remote_dentry_delete(dentry);
947 if (status < 0) {
950 mlog_errno(status);
955 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir,
959 if (status < 0) {
960 mlog_errno(status);
968 status = PTR_ERR(handle);
970 mlog_errno(status);
974 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode), fe_bh,
976 if (status < 0) {
977 mlog_errno(status);
984 status = ocfs2_delete_entry(handle, dir, &lookup);
985 if (status < 0) {
986 mlog_errno(status);
1000 status = ocfs2_mark_inode_dirty(handle, dir, parent_node_bh);
1001 if (status < 0) {
1002 mlog_errno(status);
1009 status = ocfs2_orphan_add(osb, handle, inode, fe_bh,
1011 if (status < 0)
1012 mlog_errno(status);
1037 if (status && (status != -ENOTEMPTY) && (status != -ENOENT))
1038 mlog_errno(status);
1040 return status;
1113 int status;
1132 status = inode1_is_ancestor;
1139 status = inode2_is_ancestor;
1151 status = ocfs2_inode_lock_nested(inode2, bh2, 1,
1153 if (status < 0) {
1154 if (status != -ENOENT)
1155 mlog_errno(status);
1161 status = ocfs2_inode_lock_nested(inode1, bh1, 1,
1163 if (status < 0) {
1174 if (status != -ENOENT)
1175 mlog_errno(status);
1183 if (status)
1184 mlog_errno(status);
1185 return status;
1202 int status = 0, rename_lock = 0, parents_locked = 0, target_exists = 0;
1235 status = dquot_initialize(old_dir);
1236 if (status) {
1237 mlog_errno(status);
1240 status = dquot_initialize(new_dir);
1241 if (status) {
1242 mlog_errno(status);
1265 status = ocfs2_rename_lock(osb);
1266 if (status < 0) {
1267 mlog_errno(status);
1274 status = ocfs2_check_if_ancestor(osb, new_dir->i_ino,
1276 if (status < 0) {
1277 mlog_errno(status);
1279 } else if (status == 1) {
1280 status = -EPERM;
1289 status = ocfs2_double_lock(osb, &old_dir_bh, old_dir,
1291 if (status < 0) {
1292 mlog_errno(status);
1298 status = -EACCES;
1310 status = -EIO;
1321 status = ocfs2_inode_lock_nested(old_inode, &old_inode_bh, 1,
1323 if (status < 0) {
1324 if (status != -ENOENT)
1325 mlog_errno(status);
1330 status = ocfs2_remote_dentry_delete(old_dentry);
1331 if (status < 0) {
1332 mlog_errno(status);
1340 status = ocfs2_find_files_on_disk("..", 2, &old_inode_parent,
1343 if (status) {
1344 status = -EIO;
1349 status = -EIO;
1355 status = -EMLINK;
1360 status = ocfs2_lookup_ino_from_name(old_dir, old_dentry->d_name.name,
1363 if (status) {
1364 status = -ENOENT;
1375 status = -ENOENT;
1381 status = ocfs2_find_files_on_disk(new_dentry->d_name.name,
1387 if ((status < 0) && (status != -ENOENT)) {
1390 mlog_errno(status);
1393 if (status == 0)
1403 status = -ENOENT;
1416 status = -EACCES;
1424 status = -EACCES;
1433 status = ocfs2_inode_lock(new_inode, &newfe_bh, 1);
1434 if (status < 0) {
1435 if (status != -ENOENT)
1436 mlog_errno(status);
1441 status = ocfs2_remote_dentry_delete(new_dentry);
1442 if (status < 0) {
1443 mlog_errno(status);
1454 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir,
1458 if (status < 0) {
1459 mlog_errno(status);
1467 status = ocfs2_check_dir_for_entry(new_dir,
1470 if (status)
1473 status = ocfs2_prepare_dir_for_insert(osb, new_dir, new_dir_bh,
1477 if (status < 0) {
1478 mlog_errno(status);
1485 status = PTR_ERR(handle);
1487 mlog_errno(status);
1495 status = -ENOTEMPTY;
1499 status = ocfs2_journal_access_di(handle, INODE_CACHE(new_inode),
1502 if (status < 0) {
1503 mlog_errno(status);
1508 status = ocfs2_update_entry(new_dir, handle, &target_lookup_res,
1510 if (status < 0) {
1511 mlog_errno(status);
1522 status = ocfs2_orphan_add(osb, handle, new_inode,
1525 if (status < 0) {
1526 mlog_errno(status);
1532 status = ocfs2_add_entry(handle, new_dentry, old_inode,
1535 if (status < 0) {
1536 mlog_errno(status);
1544 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode),
1547 if (status >= 0) {
1554 mlog_errno(status);
1563 status = ocfs2_find_entry(old_dentry->d_name.name,
1566 if (status) {
1576 status = ocfs2_delete_entry(handle, old_dir, &old_entry_lookup);
1577 if (status < 0) {
1578 mlog_errno(status);
1595 status = ocfs2_update_entry(old_inode, handle,
1631 status = ocfs2_journal_access_di(handle,
1641 status = 0;
1681 if (status)
1682 mlog_errno(status);
1684 return status;
1700 int virtual, blocks, status, i, bytes_left;
1713 status = -EIO;
1714 mlog_errno(status);
1720 status = -ENOMEM;
1721 mlog_errno(status);
1725 status = ocfs2_extent_map_get_blocks(inode, 0, &p_blkno, &p_blocks,
1727 if (status < 0) {
1728 mlog_errno(status);
1736 status = -EIO;
1737 mlog_errno(status);
1747 status = -ENOMEM;
1748 mlog_errno(status);
1754 status = ocfs2_journal_access(handle, INODE_CACHE(inode),
1757 if (status < 0) {
1758 mlog_errno(status);
1775 status = 0;
1784 if (status)
1785 mlog_errno(status);
1786 return status;
1793 int status, l, credits;
1821 status = dquot_initialize(dir);
1822 if (status) {
1823 mlog_errno(status);
1835 status = ocfs2_inode_lock(dir, &parent_fe_bh, 1);
1836 if (status < 0) {
1837 if (status != -ENOENT)
1838 mlog_errno(status);
1839 return status;
1845 status = -ENOENT;
1849 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name,
1851 if (status)
1854 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_fe_bh,
1857 if (status < 0) {
1858 mlog_errno(status);
1862 status = ocfs2_reserve_new_inode(osb, &inode_ac);
1863 if (status < 0) {
1864 if (status != -ENOSPC)
1865 mlog_errno(status);
1871 status = PTR_ERR(inode);
1873 mlog_errno(status);
1878 status = ocfs2_init_security_get(inode, dir, &dentry->d_name, &si);
1879 if (status) {
1880 if (status == -EOPNOTSUPP)
1883 mlog_errno(status);
1890 status = ocfs2_calc_security_init(dir, &si, &want_clusters,
1892 if (status < 0) {
1893 mlog_errno(status);
1902 status = ocfs2_reserve_clusters(osb, want_clusters, &data_ac);
1903 if (status < 0) {
1904 if (status != -ENOSPC)
1905 mlog_errno(status);
1911 status = PTR_ERR(handle);
1913 mlog_errno(status);
1921 status = dquot_alloc_inode(inode);
1922 if (status)
1931 status = ocfs2_mknod_locked(osb, dir, inode,
1934 if (status < 0) {
1935 mlog_errno(status);
1947 status = dquot_alloc_space_nodirty(inode,
1949 if (status)
1953 status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0,
1957 if (status < 0) {
1958 if (status != -ENOSPC && status != -EINTR) {
1962 mlog_errno(status);
1963 status = -ENOSPC;
1976 status = ocfs2_mark_inode_dirty(handle, inode, new_fe_bh);
1977 if (status < 0) {
1978 mlog_errno(status);
1983 status = ocfs2_create_symlink_data(osb, handle, inode,
1985 if (status < 0) {
1986 mlog_errno(status);
1992 status = ocfs2_init_security_set(handle, inode, new_fe_bh, &si,
1994 if (status < 0) {
1995 mlog_errno(status);
2005 status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno);
2006 if (status) {
2007 mlog_errno(status);
2013 status = ocfs2_add_entry(handle, dentry, inode,
2016 if (status < 0) {
2017 mlog_errno(status);
2024 if (status < 0 && did_quota)
2027 if (status < 0 && did_quota_inode)
2030 if (status < 0 && fe)
2049 if ((status < 0) && inode) {
2058 if (status)
2059 mlog_errno(status);
2061 return status;
2066 int status, namelen;
2072 status = namelen;
2074 status = -EINVAL;
2075 mlog_errno(status);
2079 status = -EINVAL;
2080 mlog_errno(status);
2086 status = 0;
2088 if (status < 0)
2089 mlog_errno(status);
2090 return status;
2234 int status = 0;
2244 status = ocfs2_read_inode_block(orphan_dir_inode, &orphan_dir_bh);
2245 if (status < 0) {
2246 mlog_errno(status);
2250 status = ocfs2_journal_access_di(handle,
2254 if (status < 0) {
2255 mlog_errno(status);
2265 status = ocfs2_journal_access_di(handle,
2269 if (status < 0) {
2270 mlog_errno(status);
2282 status = __ocfs2_add_entry(handle, orphan_dir_inode, name,
2286 if (status < 0) {
2287 mlog_errno(status);
2313 if (status < 0) {
2322 return status;
2335 int status = 0;
2339 status = snprintf(name, OCFS2_DIO_ORPHAN_PREFIX_LEN + 1, "%s",
2341 if (status != OCFS2_DIO_ORPHAN_PREFIX_LEN) {
2342 status = -EINVAL;
2343 mlog_errno(status);
2344 return status;
2347 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno,
2350 status = ocfs2_blkno_stringify(OCFS2_I(inode)->ip_blkno, name);
2351 if (status < 0) {
2352 mlog_errno(status);
2360 status = ocfs2_journal_access_di(handle,
2364 if (status < 0) {
2365 mlog_errno(status);
2370 status = ocfs2_find_entry(name, strlen(name), orphan_dir_inode,
2372 if (status) {
2373 mlog_errno(status);
2378 status = ocfs2_delete_entry(handle, orphan_dir_inode, &lookup);
2379 if (status < 0) {
2380 mlog_errno(status);
2394 if (status)
2395 mlog_errno(status);
2396 return status;
2497 int status, did_quota_inode = 0;
2510 status = ocfs2_inode_lock(dir, &parent_di_bh, 1);
2511 if (status < 0) {
2512 if (status != -ENOENT)
2513 mlog_errno(status);
2514 return status;
2517 status = ocfs2_prep_new_orphaned_file(dir, parent_di_bh,
2520 if (status < 0) {
2521 if (status != -ENOSPC)
2522 mlog_errno(status);
2528 status = PTR_ERR(inode);
2530 mlog_errno(status);
2536 status = PTR_ERR(handle);
2538 mlog_errno(status);
2542 status = dquot_alloc_inode(inode);
2543 if (status)
2547 status = ocfs2_claim_new_inode_at_loc(handle, dir, inode_ac,
2550 if (status < 0) {
2551 mlog_errno(status);
2557 status = __ocfs2_mknod_locked(dir, inode,
2561 if (status < 0) {
2562 mlog_errno(status);
2566 status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name,
2568 if (status < 0) {
2569 mlog_errno(status);
2574 status = ocfs2_open_lock(inode);
2575 if (status < 0)
2576 mlog_errno(status);
2580 if (status < 0 && did_quota_inode)
2592 if ((status < 0) && inode) {
2602 if (!status)
2609 return status;
2619 int status = 0;
2623 status = ocfs2_inode_lock(inode, &di_bh, 1);
2624 if (status < 0) {
2625 mlog_errno(status);
2635 status = ocfs2_truncate_file(inode, di_bh, i_size_read(inode));
2636 if (status < 0) {
2637 if (status != -ENOSPC)
2638 mlog_errno(status);
2642 status = ocfs2_del_inode_from_orphan(osb, inode, di_bh, 0, 0);
2643 if (status < 0) {
2644 mlog_errno(status);
2649 status = ocfs2_prepare_orphan_dir(osb, &orphan_dir_inode,
2654 if (status < 0) {
2655 mlog_errno(status);
2662 status = PTR_ERR(handle);
2666 status = ocfs2_orphan_add(osb, handle, inode, di_bh, orphan_name,
2668 if (status)
2669 mlog_errno(status);
2685 return status;
2696 int status = 0;
2702 status = -ENOENT;
2703 mlog_errno(status);
2708 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1);
2709 if (status < 0) {
2712 mlog_errno(status);
2719 status = PTR_ERR(handle);
2725 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode,
2727 if (status < 0) {
2728 mlog_errno(status);
2732 status = ocfs2_journal_access_di(handle,
2736 if (status < 0) {
2737 mlog_errno(status);
2745 status = ocfs2_set_inode_size(handle, inode, di_bh, end);
2746 if (status)
2747 mlog_errno(status);
2761 return status;
2768 int status = 0;
2783 status = ocfs2_inode_lock(dir, &parent_di_bh, 1);
2784 if (status < 0) {
2785 if (status != -ENOENT)
2786 mlog_errno(status);
2787 return status;
2793 status = -ENOENT;
2797 status = ocfs2_check_dir_for_entry(dir, dentry->d_name.name,
2799 if (status)
2803 status = ocfs2_prepare_dir_for_insert(osb, dir, parent_di_bh,
2806 if (status < 0) {
2807 mlog_errno(status);
2815 status = -ENOENT;
2816 mlog_errno(status);
2822 status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1);
2823 if (status < 0) {
2824 mlog_errno(status);
2830 status = ocfs2_read_inode_block(inode, &di_bh);
2831 if (status < 0) {
2832 mlog_errno(status);
2838 status = PTR_ERR(handle);
2840 mlog_errno(status);
2844 status = ocfs2_journal_access_di(handle, INODE_CACHE(inode),
2846 if (status < 0) {
2847 mlog_errno(status);
2851 status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode,
2853 if (status < 0) {
2854 mlog_errno(status);
2866 status = ocfs2_add_entry(handle, dentry, inode,
2869 if (status < 0) {
2870 mlog_errno(status);
2874 status = ocfs2_dentry_attach_lock(dentry, inode,
2876 if (status) {
2877 mlog_errno(status);
2882 status = 0;
2899 if (status)
2900 mlog_errno(status);
2902 return status;