Lines Matching refs:rc
52 int rc; in symlink_hash() local
56 rc = cifs_alloc_hash("md5", &md5, &sdescmd5); in symlink_hash()
57 if (rc) in symlink_hash()
60 rc = crypto_shash_init(&sdescmd5->shash); in symlink_hash()
61 if (rc) { in symlink_hash()
65 rc = crypto_shash_update(&sdescmd5->shash, link_str, link_len); in symlink_hash()
66 if (rc) { in symlink_hash()
70 rc = crypto_shash_final(&sdescmd5->shash, md5_hash); in symlink_hash()
71 if (rc) in symlink_hash()
76 return rc; in symlink_hash()
83 int rc; in parse_mf_symlink() local
96 rc = sscanf(buf, CIFS_MF_SYMLINK_LEN_FORMAT, &link_len); in parse_mf_symlink()
97 if (rc != 1) in parse_mf_symlink()
100 rc = symlink_hash(link_len, link_str, md5_hash); in parse_mf_symlink()
101 if (rc) { in parse_mf_symlink()
102 cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc); in parse_mf_symlink()
103 return rc; in parse_mf_symlink()
126 int rc; in format_mf_symlink() local
139 rc = symlink_hash(link_len, link_str, md5_hash); in format_mf_symlink()
140 if (rc) { in format_mf_symlink()
141 cifs_dbg(FYI, "%s: MD5 hash failure: %d\n", __func__, rc); in format_mf_symlink()
142 return rc; in format_mf_symlink()
186 int rc; in create_mf_symlink() local
194 rc = format_mf_symlink(buf, CIFS_MF_SYMLINK_FILE_SIZE, toName); in create_mf_symlink()
195 if (rc) in create_mf_symlink()
199 rc = tcon->ses->server->ops->create_mf_symlink(xid, tcon, in create_mf_symlink()
202 rc = -EOPNOTSUPP; in create_mf_symlink()
204 if (rc) in create_mf_symlink()
208 rc = -EIO; in create_mf_symlink()
211 return rc; in create_mf_symlink()
219 int rc; in query_mf_symlink() local
229 rc = tcon->ses->server->ops->query_mf_symlink(xid, tcon, in query_mf_symlink()
232 rc = -ENOSYS; in query_mf_symlink()
234 if (rc) in query_mf_symlink()
238 rc = -EINVAL; in query_mf_symlink()
242 rc = parse_mf_symlink(buf, bytes_read, &link_len, symlinkinfo); in query_mf_symlink()
245 return rc; in query_mf_symlink()
253 int rc; in check_mf_symlink() local
267 rc = tcon->ses->server->ops->query_mf_symlink(xid, tcon, in check_mf_symlink()
270 rc = -ENOSYS; in check_mf_symlink()
272 if (rc) in check_mf_symlink()
278 rc = parse_mf_symlink(buf, bytes_read, &link_len, NULL); in check_mf_symlink()
279 if (rc == -EINVAL) { in check_mf_symlink()
281 rc = 0; in check_mf_symlink()
285 if (rc != 0) in check_mf_symlink()
295 return rc; in check_mf_symlink()
307 int rc; in cifs_query_mf_symlink() local
324 rc = CIFS_open(xid, &oparms, &oplock, &file_info); in cifs_query_mf_symlink()
325 if (rc) in cifs_query_mf_symlink()
326 return rc; in cifs_query_mf_symlink()
329 rc = -ENOENT; in cifs_query_mf_symlink()
340 rc = CIFSSMBRead(xid, &io_parms, pbytes_read, &pbuf, &buf_type); in cifs_query_mf_symlink()
343 return rc; in cifs_query_mf_symlink()
351 int rc; in cifs_create_mf_symlink() local
370 rc = CIFS_open(xid, &oparms, &oplock, NULL); in cifs_create_mf_symlink()
371 if (rc) in cifs_create_mf_symlink()
372 return rc; in cifs_create_mf_symlink()
380 rc = CIFSSMBWrite(xid, &io_parms, pbytes_written, pbuf); in cifs_create_mf_symlink()
382 return rc; in cifs_create_mf_symlink()
393 int rc; in smb3_query_mf_symlink() local
424 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, pfile_info, NULL, in smb3_query_mf_symlink()
426 if (rc) in smb3_query_mf_symlink()
431 rc = -ENOENT; /* Is there a better rc to return? */ in smb3_query_mf_symlink()
442 rc = SMB2_read(xid, &io_parms, pbytes_read, &pbuf, &buf_type); in smb3_query_mf_symlink()
448 return rc; in smb3_query_mf_symlink()
456 int rc; in smb3_create_mf_symlink() local
482 rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, in smb3_create_mf_symlink()
484 if (rc) { in smb3_create_mf_symlink()
486 return rc; in smb3_create_mf_symlink()
501 rc = SMB2_write(xid, &io_parms, pbytes_written, iov, 1); in smb3_create_mf_symlink()
504 if ((rc == 0) && (*pbytes_written != CIFS_MF_SYMLINK_FILE_SIZE)) in smb3_create_mf_symlink()
505 rc = -EIO; in smb3_create_mf_symlink()
510 return rc; in smb3_create_mf_symlink()
521 int rc = -EACCES; in cifs_hardlink() local
541 rc = -ENOMEM; in cifs_hardlink()
546 rc = CIFSUnixCreateHardLink(xid, tcon, from_name, to_name, in cifs_hardlink()
552 rc = -ENOSYS; in cifs_hardlink()
555 rc = server->ops->create_hardlink(xid, tcon, from_name, to_name, in cifs_hardlink()
557 if ((rc == -EIO) || (rc == -EINVAL)) in cifs_hardlink()
558 rc = -EOPNOTSUPP; in cifs_hardlink()
569 if (rc == 0) { in cifs_hardlink()
604 return rc; in cifs_hardlink()
611 int rc = -ENOMEM; in cifs_get_link() local
642 rc = -EACCES; in cifs_get_link()
648 rc = query_mf_symlink(xid, tcon, cifs_sb, full_path, in cifs_get_link()
651 if (rc != 0 && server->ops->query_symlink) { in cifs_get_link()
658 rc = server->ops->query_symlink(xid, tcon, cifs_sb, full_path, in cifs_get_link()
665 if (rc != 0) { in cifs_get_link()
667 return ERR_PTR(rc); in cifs_get_link()
676 int rc = -EOPNOTSUPP; in cifs_symlink() local
688 rc = PTR_ERR(tlink); in cifs_symlink()
695 rc = -ENOMEM; in cifs_symlink()
704 rc = create_mf_symlink(xid, pTcon, cifs_sb, full_path, symname); in cifs_symlink()
706 rc = CIFSUnixCreateSymLink(xid, pTcon, full_path, symname, in cifs_symlink()
713 if (rc == 0) { in cifs_symlink()
715 rc = cifs_get_inode_info_unix(&newinode, full_path, in cifs_symlink()
718 rc = cifs_get_inode_info(&newinode, full_path, NULL, in cifs_symlink()
721 if (rc != 0) { in cifs_symlink()
723 rc); in cifs_symlink()
732 return rc; in cifs_symlink()