Lines Matching refs:rc
341 int rc; local
351 rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->fid.netfid, &find_data);
352 if (!rc) {
354 } else if (rc == -EREMOTE) {
356 rc = 0;
360 rc = cifs_fattr_to_inode(inode, &fattr);
364 return rc;
371 int rc; local
386 rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data,
390 if (!rc) {
392 } else if (rc == -EREMOTE) {
394 rc = 0;
396 return rc;
412 rc = -ENOMEM;
420 rc = -ESTALE;
425 rc = cifs_fattr_to_inode(*pinode, &fattr);
429 return rc;
436 int rc; local
480 rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);
481 if (rc) {
482 cifs_dbg(FYI, "check sfu type of %s, open rc = %d\n", path, rc);
484 return rc;
494 rc = tcon->ses->server->ops->sync_read(xid, &fid, &io_parms,
496 if ((rc == 0) && (bytes_read >= 8)) {
528 rc = -EOPNOTSUPP;
533 rc = -EOPNOTSUPP; /* or some unknown SFU type */
538 return rc;
552 ssize_t rc; local
568 rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path,
572 if (rc < 0)
573 return (int)rc;
574 else if (rc > 3) {
731 int rc; local
744 rc = server->ops->query_file_info(xid, tcon, &cfile->fid, &find_data);
745 switch (rc) {
753 rc = 0;
762 rc = 0;
776 rc = cifs_fattr_to_inode(inode, &fattr);
779 return rc;
819 int rc; local
837 rc = CIFSFindFirst(xid, tcon, full_path,
839 if (rc)
840 return rc;
858 int rc; local
872 rc = server->ops->get_srv_inum(xid,
877 if (rc) {
928 int rc = 0; local
949 rc = -ENOMEM;
952 rc = server->ops->query_path_info(xid, tcon, cifs_sb,
962 switch (rc) {
971 rc = server->ops->query_reparse_tag(xid, tcon, cifs_sb,
981 rc = 0;
997 rc = cifs_backup_query_path_info(xid, tcon, sb,
1001 if (rc)
1017 cifs_dbg(FYI, "%s: unhandled err rc %d\n", __func__, rc);
1042 rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, true,
1044 if (rc == -EREMOTE)
1045 rc = 0;
1046 if (rc) {
1048 __func__, rc);
1052 rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, false,
1054 if (rc == -EREMOTE)
1055 rc = 0;
1056 if (rc) {
1058 __func__, rc);
1082 rc = -ENOMEM;
1090 rc = -ESTALE;
1094 rc = cifs_fattr_to_inode(*inode, &fattr);
1100 return rc;
1115 int rc = 0; local
1133 rc = -ENOMEM;
1137 rc = smb311_posix_query_path_info(xid, tcon, cifs_sb,
1145 switch (rc) {
1152 rc = 0;
1163 cifs_dbg(FYI, "%s: unhandled err rc %d\n", __func__, rc);
1187 rc = -ENOMEM;
1195 rc = -ESTALE;
1200 rc = cifs_fattr_to_inode(*inode, &fattr);
1205 return rc;
1318 long rc; local
1339 rc = cifs_get_inode_info_unix(&inode, path, sb, xid);
1341 if (rc != -EOPNOTSUPP)
1349 rc = smb311_posix_get_inode_info(&inode, path, sb, xid);
1351 rc = cifs_get_inode_info(&inode, path, NULL, sb, xid, NULL);
1355 inode = ERR_PTR(rc);
1364 if (rc && tcon->pipe) {
1374 } else if (rc) {
1376 inode = ERR_PTR(rc);
1446 int rc; local
1467 rc = -EBUSY;
1480 rc = CIFS_open(xid, &oparms, &oplock, NULL);
1481 if (rc != 0)
1497 rc = -ENOMEM;
1501 rc = CIFSSMBSetFileInfo(xid, tcon, info_buf, fid.netfid,
1505 if (!rc)
1512 rc = CIFSSMBRenameOpenFile(xid, tcon, fid.netfid, NULL,
1515 if (rc != 0) {
1516 rc = -EBUSY;
1522 rc = CIFSSMBSetFileDisposition(xid, tcon, true, fid.netfid,
1532 if (rc == -ENOENT)
1533 rc = 0;
1534 else if (rc != 0) {
1535 rc = -EBUSY;
1546 return rc;
1586 int rc = 0; local
1615 rc = -EACCES;
1623 rc = PTR_ERR(full_path);
1630 rc = CIFSPOSIXDelFile(xid, tcon, full_path,
1633 cifs_dbg(FYI, "posix del rc %d\n", rc);
1634 if ((rc == 0) || (rc == -ENOENT))
1640 rc = -ENOSYS;
1644 rc = server->ops->unlink(xid, tcon, full_path, cifs_sb);
1647 if (!rc) {
1650 } else if (rc == -ENOENT) {
1652 } else if (rc == -EBUSY) {
1654 rc = server->ops->rename_pending_delete(full_path,
1656 if (rc == 0)
1659 } else if ((rc == -EACCES) && (dosattr == 0) && inode) {
1662 rc = -ENOMEM;
1676 rc = cifs_set_file_info(inode, attrs, xid, full_path, dosattr);
1677 if (rc != 0)
1684 if (rc != 0 && dosattr != 0)
1702 return rc;
1710 int rc = 0; local
1714 rc = smb311_posix_get_inode_info(&inode, full_path, parent->i_sb, xid);
1716 rc = cifs_get_inode_info_unix(&inode, full_path, parent->i_sb,
1719 rc = cifs_get_inode_info(&inode, full_path, NULL, parent->i_sb,
1722 if (rc)
1723 return rc;
1794 int rc = 0; local
1802 rc = -ENOMEM;
1807 rc = CIFSPOSIXCreate(xid, tcon, SMB_O_DIRECTORY | SMB_O_CREAT, mode,
1810 if (rc == -EOPNOTSUPP)
1812 else if (rc) {
1813 cifs_dbg(FYI, "posix mkdir returned 0x%x\n", rc);
1845 return rc;
1847 rc = cifs_mkdir_qinfo(inode, dentry, mode, full_path, cifs_sb, tcon,
1855 int rc = 0; local
1880 rc = PTR_ERR(full_path);
1887 rc = server->ops->posix_mkdir(xid, inode, mode, tcon, full_path,
1895 rc = cifs_posix_mkdir(inode, direntry, mode, full_path, cifs_sb,
1897 if (rc != -EOPNOTSUPP)
1902 rc = -ENOSYS;
1907 rc = server->ops->mkdir(xid, inode, mode, tcon, full_path, cifs_sb);
1908 if (rc) {
1909 cifs_dbg(FYI, "cifs_mkdir returned 0x%x\n", rc);
1915 rc = cifs_mkdir_qinfo(inode, direntry, mode, full_path, cifs_sb, tcon,
1926 return rc;
1931 int rc = 0; local
1947 rc = PTR_ERR(full_path);
1953 rc = -EIO;
1959 rc = PTR_ERR(tlink);
1966 rc = -ENOSYS;
1972 rc = -EACCES;
1977 rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb);
1980 if (!rc) {
2004 return rc;
2018 int oplock, rc; local
2030 rc = server->ops->rename(xid, tcon, from_path, to_path, cifs_sb);
2037 if (rc == 0 || rc != -EBUSY)
2058 rc = CIFS_open(xid, &oparms, &oplock, NULL);
2059 if (rc == 0) {
2060 rc = CIFSSMBRenameOpenFile(xid, tcon, fid.netfid,
2066 if (rc == 0)
2069 return rc;
2085 int rc, tmprc; local
2106 rc = PTR_ERR(from_name);
2112 rc = PTR_ERR(to_name);
2120 rc = cifs_do_rename(xid, source_dentry, from_name, target_dentry,
2123 if (rc == -EACCES) {
2126 rc = cifs_do_rename(xid, source_dentry, from_name, target_dentry,
2128 if (rc != -EACCES)
2140 if (rc == -EEXIST && tcon->unix_ext) {
2149 rc = -ENOMEM;
2169 rc = 0;
2180 if (d_really_is_positive(target_dentry) && (rc == -EACCES || rc == -EEXIST)) {
2187 rc = cifs_do_rename(xid, source_dentry, from_name,
2203 return rc;
2266 int rc = 0; local
2269 rc = invalidate_inode_pages2(inode->i_mapping);
2270 if (rc)
2276 return rc;
2297 int rc; local
2305 rc = wait_on_bit_lock_action(flags, CIFS_INO_LOCK, cifs_wait_bit_killable,
2307 if (rc)
2308 return rc;
2315 rc = cifs_invalidate_mapping(inode);
2316 if (rc)
2325 return rc;
2337 int rc = 0; local
2342 return rc;
2345 rc = cifs_get_file_info_unix(filp);
2347 rc = cifs_get_file_info(filp);
2349 return rc;
2355 int rc = 0; local
2366 return rc;
2373 rc = PTR_ERR(full_path);
2383 rc = smb311_posix_get_inode_info(&inode, full_path, sb, xid);
2385 rc = cifs_get_inode_info_unix(&inode, full_path, sb, xid);
2387 rc = cifs_get_inode_info(&inode, full_path, NULL, sb,
2389 if (rc == -EAGAIN && count++ < 10)
2395 return rc;
2400 int rc; local
2403 rc = cifs_revalidate_file_attr(filp);
2404 if (rc)
2405 return rc;
2413 int rc; local
2416 rc = cifs_revalidate_dentry_attr(dentry);
2417 if (rc)
2418 return rc;
2430 int rc; local
2442 rc = filemap_fdatawait(inode->i_mapping);
2443 if (rc) {
2444 mapping_set_error(inode->i_mapping, rc);
2445 return rc;
2459 rc = cifs_revalidate_dentry_attr(dentry);
2460 if (rc)
2461 return rc;
2505 int rc; local
2516 rc = filemap_fdatawait(inode->i_mapping);
2517 if (rc) {
2518 mapping_set_error(inode->i_mapping, rc);
2519 return rc;
2528 rc = server->ops->fiemap(tcon, cfile, fei, start, len);
2530 return rc;
2542 int rc = 0; local
2551 return rc;
2571 int rc; local
2593 rc = server->ops->set_file_size(xid, tcon, open_file,
2596 rc = -ENOSYS;
2598 cifs_dbg(FYI, "SetFSize for attrs rc = %d\n", rc);
2600 rc = -EINVAL;
2602 if (!rc)
2619 rc = server->ops->set_path_size(xid, tcon, full_path,
2622 rc = -ENOSYS;
2623 cifs_dbg(FYI, "SetEOF by path (setattrs) rc = %d\n", rc);
2629 if (rc == 0) {
2652 return rc;
2658 int rc; local
2678 rc = setattr_prepare(&init_user_ns, direntry, attrs);
2679 if (rc < 0)
2684 rc = PTR_ERR(full_path);
2699 rc = filemap_write_and_wait(inode->i_mapping);
2700 if (is_interrupt_error(rc)) {
2701 rc = -ERESTARTSYS;
2705 mapping_set_error(inode->i_mapping, rc);
2706 rc = 0;
2709 rc = cifs_set_file_size(inode, attrs, xid, full_path);
2710 if (rc != 0)
2720 rc = -ENOMEM;
2761 rc = CIFSSMBUnixSetFileInfo(xid, pTcon, args, nfid, npid);
2766 rc = PTR_ERR(tlink);
2770 rc = CIFSSMBUnixSetPathInfo(xid, pTcon, full_path, args,
2776 if (rc)
2798 return rc;
2814 int rc = -EACCES; local
2826 rc = setattr_prepare(&init_user_ns, direntry, attrs);
2827 if (rc < 0)
2832 rc = PTR_ERR(full_path);
2846 rc = filemap_write_and_wait(inode->i_mapping);
2847 if (is_interrupt_error(rc)) {
2848 rc = -ERESTARTSYS;
2851 mapping_set_error(inode->i_mapping, rc);
2854 rc = 0;
2858 rc = cifs_get_writable_file(cifsInode, FIND_WR_ANY, &wfile);
2859 if (!rc) {
2861 rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
2863 if (rc)
2865 } else if (rc != -EBADF)
2868 rc = 0;
2872 rc = cifs_set_file_size(inode, attrs, xid, full_path);
2873 if (rc != 0)
2887 rc = id_mode_to_cifs_acl(inode, full_path, &mode,
2889 if (rc) {
2891 __func__, rc);
2905 rc = 0;
2908 rc = id_mode_to_cifs_acl(inode, full_path, &mode,
2910 if (rc) {
2912 __func__, rc);
2957 rc = cifs_set_file_info(inode, attrs, xid, full_path, dosattr);
2965 if ((rc) && (attrs->ia_valid &
2967 rc = 0;
2972 if (rc)
2985 return rc;
2994 int rc, retries = 0; local
3001 rc = cifs_setattr_unix(direntry, attrs);
3003 rc = cifs_setattr_nounix(direntry, attrs);
3005 } while (is_retryable_error(rc) && retries < 2);
3008 return rc;