Lines Matching refs:status

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