Lines Matching refs:rc

356 	int rc = 0;
361 rc = -ENOMEM;
362 return rc;
380 int rc;
394 rc = -ENOMEM;
399 rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->fid.netfid, &find_data);
400 if (!rc) {
402 } else if (rc == -EREMOTE) {
407 rc = cifs_fattr_to_inode(inode, &fattr, false);
411 return rc;
425 int rc, tmprc;
436 rc = CIFSSMBUnixQPathInfo(xid, tcon, full_path, &find_data,
438 cifs_dbg(FYI, "%s: query path info: rc = %d\n", __func__, rc);
441 if (!rc) {
443 } else if (rc == -EREMOTE) {
445 rc = 0;
447 return rc;
462 rc = server->ops->query_symlink(xid, tcon,
465 cifs_dbg(FYI, "%s: query_symlink: %d\n", __func__, rc);
467 return rc;
475 int rc;
477 rc = cifs_get_unix_fattr(full_path, sb, &fattr, pinode, xid);
478 if (rc)
481 rc = update_inode_info(sb, &fattr, pinode);
484 return rc;
508 int rc;
553 rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);
554 if (rc) {
555 cifs_dbg(FYI, "check sfu type of %s, open rc = %d\n", path, rc);
557 return rc;
567 rc = tcon->ses->server->ops->sync_read(xid, &fid, &io_parms,
569 if ((rc == 0) && (bytes_read >= 8)) {
605 rc = -EOPNOTSUPP;
610 rc = -EOPNOTSUPP; /* or some unknown SFU type */
615 return rc;
629 ssize_t rc;
645 rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path,
649 if (rc < 0)
650 return (int)rc;
651 else if (rc > 3) {
810 int rc;
828 rc = server->ops->query_file_info(xid, tcon, cfile, &data);
829 switch (rc) {
839 rc = PTR_ERR(path);
856 rc = 0;
870 rc = cifs_fattr_to_inode(inode, &fattr, false);
875 return rc;
916 int rc;
934 rc = CIFSFindFirst(xid, tcon, full_path,
936 if (rc)
937 return rc;
951 int rc;
965 rc = server->ops->get_srv_inum(xid, *inode ? NULL : tcon, cifs_sb, full_path,
967 if (rc) {
1012 int rc = 0;
1015 rc = server->ops->query_reparse_point(xid, tcon, cifs_sb,
1018 if (!rc)
1025 rc = -EOPNOTSUPP;
1029 rc = server->ops->query_symlink(xid, tcon,
1036 rc = 0;
1041 rc = 0;
1043 rc = server->ops->parse_reparse_point(cifs_sb,
1056 return rc;
1072 int rc = 0;
1086 rc = server->ops->query_path_info(xid, tcon, cifs_sb,
1095 switch (rc) {
1103 rc = reparse_info_to_fattr(data, sb, xid, tcon,
1108 if (!rc && *inode &&
1115 rc = 0;
1133 rc = cifs_backup_query_path_info(xid, tcon, sb,
1137 if (rc)
1157 cifs_dbg(FYI, "%s: unhandled err rc %d\n", __func__, rc);
1183 rc = cifs_acl_to_fattr(cifs_sb, fattr, *inode,
1185 if (rc == -EREMOTE)
1186 rc = 0;
1187 if (rc) {
1188 cifs_dbg(FYI, "%s: Get mode from SID failed. rc=%d\n",
1189 __func__, rc);
1193 rc = cifs_acl_to_fattr(cifs_sb, fattr, *inode,
1195 if (rc == -EREMOTE)
1196 rc = 0;
1197 if (rc) {
1199 __func__, rc);
1218 return rc;
1228 int rc;
1235 rc = cifs_get_fattr(data, sb, xid, fid, &fattr, inode, full_path);
1236 if (rc)
1239 rc = update_inode_info(sb, &fattr, inode);
1242 return rc;
1257 int rc = 0;
1269 rc = server->ops->query_path_info(xid, tcon, cifs_sb,
1278 switch (rc) {
1281 rc = reparse_info_to_fattr(data, sb, xid, tcon,
1290 rc = 0;
1301 cifs_dbg(FYI, "%s: unhandled err rc %d\n", __func__, rc);
1317 return rc;
1327 int rc;
1334 rc = smb311_posix_get_fattr(data, &fattr, full_path, sb, xid);
1335 if (rc)
1338 rc = update_inode_info(sb, &fattr, inode);
1339 if (!rc && fattr.cf_flags & CIFS_FATTR_DELETE_PENDING)
1343 return rc;
1458 int rc;
1476 rc = cifs_get_unix_fattr(path, sb, &fattr, &inode, xid);
1478 if (rc != -EOPNOTSUPP)
1486 rc = smb311_posix_get_fattr(NULL, &fattr, path, sb, xid);
1488 rc = cifs_get_fattr(NULL, sb, xid, NULL, &fattr, &inode, path);
1491 if (!rc) {
1500 inode = ERR_PTR(rc);
1504 if (!rc && fattr.cf_flags & CIFS_FATTR_DELETE_PENDING)
1507 if (rc && tcon->pipe) {
1517 } else if (rc) {
1519 inode = ERR_PTR(rc);
1591 int rc;
1612 rc = -EBUSY;
1626 rc = CIFS_open(xid, &oparms, &oplock, NULL);
1627 if (rc != 0)
1643 rc = -ENOMEM;
1647 rc = CIFSSMBSetFileInfo(xid, tcon, info_buf, fid.netfid,
1651 if (!rc)
1658 rc = CIFSSMBRenameOpenFile(xid, tcon, fid.netfid, NULL,
1661 if (rc != 0) {
1662 rc = -EBUSY;
1668 rc = CIFSSMBSetFileDisposition(xid, tcon, true, fid.netfid,
1678 if (rc == -ENOENT)
1679 rc = 0;
1680 else if (rc != 0) {
1681 rc = -EBUSY;
1692 return rc;
1733 int rc = 0;
1762 rc = -EACCES;
1770 rc = PTR_ERR(full_path);
1778 rc = CIFSPOSIXDelFile(xid, tcon, full_path,
1781 cifs_dbg(FYI, "posix del rc %d\n", rc);
1782 if ((rc == 0) || (rc == -ENOENT))
1789 rc = -ENOSYS;
1793 rc = server->ops->unlink(xid, tcon, full_path, cifs_sb, dentry);
1796 if (!rc) {
1801 } else if (rc == -ENOENT) {
1803 } else if (rc == -EBUSY) {
1805 rc = server->ops->rename_pending_delete(full_path,
1807 if (rc == 0) {
1812 } else if ((rc == -EACCES) && (dosattr == 0) && inode) {
1815 rc = -ENOMEM;
1829 rc = cifs_set_file_info(inode, attrs, xid, full_path, dosattr);
1830 if (rc != 0)
1837 if (rc != 0 && dosattr != 0)
1855 return rc;
1863 int rc = 0;
1867 rc = smb311_posix_get_inode_info(&inode, full_path,
1871 rc = cifs_get_inode_info_unix(&inode, full_path, parent->i_sb,
1875 rc = cifs_get_inode_info(&inode, full_path, NULL, parent->i_sb,
1879 if (rc)
1880 return rc;
1956 int rc = 0;
1964 rc = -ENOMEM;
1969 rc = CIFSPOSIXCreate(xid, tcon, SMB_O_DIRECTORY | SMB_O_CREAT, mode,
1972 if (rc == -EOPNOTSUPP)
1974 else if (rc) {
1975 cifs_dbg(FYI, "posix mkdir returned 0x%x\n", rc);
2007 return rc;
2009 rc = cifs_mkdir_qinfo(inode, dentry, mode, full_path, cifs_sb, tcon,
2018 int rc = 0;
2043 rc = PTR_ERR(full_path);
2050 rc = server->ops->posix_mkdir(xid, inode, mode, tcon, full_path,
2059 rc = cifs_posix_mkdir(inode, direntry, mode, full_path, cifs_sb,
2061 if (rc != -EOPNOTSUPP)
2067 rc = -ENOSYS;
2072 rc = server->ops->mkdir(xid, inode, mode, tcon, full_path, cifs_sb);
2073 if (rc) {
2074 cifs_dbg(FYI, "cifs_mkdir returned 0x%x\n", rc);
2080 rc = cifs_mkdir_qinfo(inode, direntry, mode, full_path, cifs_sb, tcon,
2091 return rc;
2096 int rc = 0;
2112 rc = PTR_ERR(full_path);
2118 rc = -EIO;
2124 rc = PTR_ERR(tlink);
2131 rc = -ENOSYS;
2137 rc = -EACCES;
2142 rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb);
2145 if (!rc) {
2169 return rc;
2186 int rc;
2198 rc = server->ops->rename(xid, tcon, from_dentry,
2206 if (rc == 0 || rc != -EBUSY)
2229 rc = CIFS_open(xid, &oparms, &oplock, NULL);
2230 if (rc == 0) {
2231 rc = CIFSSMBRenameOpenFile(xid, tcon, fid.netfid,
2238 if (rc == 0)
2241 return rc;
2255 int rc, tmprc;
2280 rc = PTR_ERR(from_name);
2286 rc = PTR_ERR(to_name);
2294 rc = cifs_do_rename(xid, source_dentry, from_name, target_dentry,
2297 if (rc == -EACCES) {
2300 rc = cifs_do_rename(xid, source_dentry, from_name, target_dentry,
2302 if (rc != -EACCES)
2315 if (rc == -EEXIST && tcon->unix_ext) {
2324 rc = -ENOMEM;
2344 rc = 0;
2357 if (d_really_is_positive(target_dentry) && (rc == -EACCES || rc == -EEXIST)) {
2364 rc = cifs_do_rename(xid, source_dentry, from_name,
2377 return rc;
2440 int rc = 0;
2443 rc = invalidate_inode_pages2(inode->i_mapping);
2444 if (rc)
2445 cifs_dbg(VFS, "%s: invalidate inode %p failed with rc %d\n",
2446 __func__, inode, rc);
2449 return rc;
2470 int rc;
2478 rc = wait_on_bit_lock_action(flags, CIFS_INO_LOCK, cifs_wait_bit_killable,
2480 if (rc)
2481 return rc;
2488 rc = cifs_invalidate_mapping(inode);
2489 if (rc)
2498 return rc;
2510 int rc = 0;
2517 return rc;
2521 rc = cifs_get_file_info_unix(filp);
2524 rc = cifs_get_file_info(filp);
2526 return rc;
2532 int rc = 0;
2543 return rc;
2550 rc = PTR_ERR(full_path);
2560 rc = smb311_posix_get_inode_info(&inode, full_path,
2563 rc = cifs_get_inode_info_unix(&inode, full_path, sb, xid);
2565 rc = cifs_get_inode_info(&inode, full_path, NULL, sb,
2568 if (rc == -EAGAIN && count++ < 10)
2574 return rc;
2579 int rc;
2582 rc = cifs_revalidate_file_attr(filp);
2583 if (rc)
2584 return rc;
2592 int rc;
2595 rc = cifs_revalidate_dentry_attr(dentry);
2596 if (rc)
2597 return rc;
2609 int rc;
2621 rc = filemap_fdatawait(inode->i_mapping);
2622 if (rc) {
2623 mapping_set_error(inode->i_mapping, rc);
2624 return rc;
2638 rc = cifs_revalidate_dentry_attr(dentry);
2639 if (rc)
2640 return rc;
2684 int rc;
2695 rc = filemap_fdatawait(inode->i_mapping);
2696 if (rc) {
2697 mapping_set_error(inode->i_mapping, rc);
2698 return rc;
2707 rc = server->ops->fiemap(tcon, cfile, fei, start, len);
2709 return rc;
2721 int rc = 0;
2730 return rc;
2750 int rc;
2772 rc = server->ops->set_file_size(xid, tcon, open_file,
2775 rc = -ENOSYS;
2777 cifs_dbg(FYI, "SetFSize for attrs rc = %d\n", rc);
2779 rc = -EINVAL;
2781 if (!rc)
2798 rc = server->ops->set_path_size(xid, tcon, full_path,
2801 rc = -ENOSYS;
2802 cifs_dbg(FYI, "SetEOF by path (setattrs) rc = %d\n", rc);
2808 if (rc == 0) {
2831 return rc;
2838 int rc;
2858 rc = setattr_prepare(&nop_mnt_idmap, direntry, attrs);
2859 if (rc < 0)
2864 rc = PTR_ERR(full_path);
2879 rc = filemap_write_and_wait(inode->i_mapping);
2880 if (is_interrupt_error(rc)) {
2881 rc = -ERESTARTSYS;
2885 mapping_set_error(inode->i_mapping, rc);
2886 rc = 0;
2889 rc = cifs_set_file_size(inode, attrs, xid, full_path, direntry);
2890 if (rc != 0)
2900 rc = -ENOMEM;
2941 rc = CIFSSMBUnixSetFileInfo(xid, pTcon, args, nfid, npid);
2946 rc = PTR_ERR(tlink);
2950 rc = CIFSSMBUnixSetPathInfo(xid, pTcon, full_path, args,
2956 if (rc)
2981 return rc;
2998 int rc = -EACCES;
3010 rc = setattr_prepare(&nop_mnt_idmap, direntry, attrs);
3011 if (rc < 0)
3016 rc = PTR_ERR(full_path);
3030 rc = filemap_write_and_wait(inode->i_mapping);
3031 if (is_interrupt_error(rc)) {
3032 rc = -ERESTARTSYS;
3035 mapping_set_error(inode->i_mapping, rc);
3038 rc = 0;
3042 rc = cifs_get_writable_file(cifsInode, FIND_WR_ANY, &wfile);
3043 if (!rc) {
3045 rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
3047 if (rc)
3049 } else if (rc != -EBADF)
3052 rc = 0;
3056 rc = cifs_set_file_size(inode, attrs, xid, full_path, direntry);
3057 if (rc != 0)
3071 rc = id_mode_to_cifs_acl(inode, full_path, &mode,
3073 if (rc) {
3075 __func__, rc);
3089 rc = 0;
3092 rc = id_mode_to_cifs_acl(inode, full_path, &mode,
3094 if (rc) {
3096 __func__, rc);
3141 rc = cifs_set_file_info(inode, attrs, xid, full_path, dosattr);
3142 /* BB: check for rc = -EOPNOTSUPP and switch to legacy mode */
3149 if ((rc) && (attrs->ia_valid &
3151 rc = 0;
3156 if (rc)
3172 return rc;
3180 int rc, retries = 0;
3191 rc = cifs_setattr_unix(direntry, attrs);
3194 rc = cifs_setattr_nounix(direntry, attrs);
3196 } while (is_retryable_error(rc) && retries < 2);
3199 return rc;