Lines Matching refs:tcon

402 smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)  in smb2_negotiate_wsize()  argument
404 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_wsize()
417 smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx) in smb3_negotiate_wsize() argument
419 struct TCP_Server_Info *server = tcon->ses->server; in smb3_negotiate_wsize()
449 smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx) in smb2_negotiate_rsize() argument
451 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_rsize()
465 smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx) in smb3_negotiate_rsize() argument
467 struct TCP_Server_Info *server = tcon->ses->server; in smb3_negotiate_rsize()
640 SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon) in SMB3_request_interfaces() argument
647 struct cifs_ses *ses = tcon->ses; in SMB3_request_interfaces()
649 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in SMB3_request_interfaces()
690 SMB2_close(0, cfid->tcon, cfid->fid->persistent_fid, in smb2_close_cached_fid()
743 int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, in open_cached_dir() argument
748 struct cifs_ses *ses = tcon->ses; in open_cached_dir()
764 if (tcon->nohandlecache) in open_cached_dir()
775 mutex_lock(&tcon->crfid.fid_mutex); in open_cached_dir()
776 if (tcon->crfid.is_valid) { in open_cached_dir()
778 *cfid = &tcon->crfid; in open_cached_dir()
779 kref_get(&tcon->crfid.refcount); in open_cached_dir()
780 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir()
791 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir()
793 if (smb3_encryption_required(tcon)) in open_cached_dir()
799 pfid = tcon->crfid.fid; in open_cached_dir()
811 oparms.tcon = tcon; in open_cached_dir()
818 rc = SMB2_open_init(tcon, server, in open_cached_dir()
822 smb2_set_next_command(tcon, &rqst[0]); in open_cached_dir()
828 rc = SMB2_query_info_init(tcon, server, in open_cached_dir()
842 mutex_lock(&tcon->crfid.fid_mutex); in open_cached_dir()
849 if (tcon->crfid.is_valid) { in open_cached_dir()
862 kref_get(&tcon->crfid.refcount); in open_cached_dir()
864 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir()
868 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in open_cached_dir()
878 tcon->need_reconnect = true; in open_cached_dir()
880 tcon->treeName); in open_cached_dir()
885 atomic_inc(&tcon->num_remote_opens); in open_cached_dir()
894 tcon->crfid.tcon = tcon; in open_cached_dir()
895 tcon->crfid.is_valid = true; in open_cached_dir()
896 tcon->crfid.dentry = dentry; in open_cached_dir()
898 kref_init(&tcon->crfid.refcount); in open_cached_dir()
906 kref_get(&tcon->crfid.refcount); in open_cached_dir()
907 tcon->crfid.has_lease = true; in open_cached_dir()
922 (char *)&tcon->crfid.file_all_info)) in open_cached_dir()
923 tcon->crfid.file_all_info_is_valid = true; in open_cached_dir()
924 tcon->crfid.time = jiffies; in open_cached_dir()
928 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir()
935 *cfid = &tcon->crfid; in open_cached_dir()
939 int open_cached_dir_by_dentry(struct cifs_tcon *tcon, in open_cached_dir_by_dentry() argument
943 mutex_lock(&tcon->crfid.fid_mutex); in open_cached_dir_by_dentry()
944 if (tcon->crfid.dentry == dentry) { in open_cached_dir_by_dentry()
946 *cfid = &tcon->crfid; in open_cached_dir_by_dentry()
947 kref_get(&tcon->crfid.refcount); in open_cached_dir_by_dentry()
948 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir_by_dentry()
951 mutex_unlock(&tcon->crfid.fid_mutex); in open_cached_dir_by_dentry()
956 smb3_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon, in smb3_qfs_tcon() argument
966 oparms.tcon = tcon; in smb3_qfs_tcon()
973 rc = open_cached_dir(xid, tcon, "", cifs_sb, &cfid); in smb3_qfs_tcon()
982 SMB3_request_interfaces(xid, tcon); in smb3_qfs_tcon()
984 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_qfs_tcon()
986 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_qfs_tcon()
988 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_qfs_tcon()
990 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_qfs_tcon()
993 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb3_qfs_tcon()
999 smb2_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon, in smb2_qfs_tcon() argument
1008 oparms.tcon = tcon; in smb2_qfs_tcon()
1020 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb2_qfs_tcon()
1022 SMB2_QFS_attr(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb2_qfs_tcon()
1024 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb2_qfs_tcon()
1028 smb2_is_path_accessible(const unsigned int xid, struct cifs_tcon *tcon, in smb2_is_path_accessible() argument
1037 if ((*full_path == 0) && tcon->crfid.is_valid) in smb2_is_path_accessible()
1044 oparms.tcon = tcon; in smb2_is_path_accessible()
1058 rc = SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb2_is_path_accessible()
1064 smb2_get_srv_inum(const unsigned int xid, struct cifs_tcon *tcon, in smb2_get_srv_inum() argument
1073 smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_file_info() argument
1084 rc = SMB2_query_info(xid, tcon, fid->persistent_fid, fid->volatile_fid, in smb2_query_file_info()
1177 smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_eas() argument
1193 rc = smb2_query_info_compound(xid, tcon, utf16_path, in smb2_query_eas()
1233 smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, in smb2_set_ea() argument
1238 struct cifs_ses *ses = tcon->ses; in smb2_set_ea()
1259 if (smb3_encryption_required(tcon)) in smb2_set_ea()
1275 rc = ses->server->ops->query_all_EAs(xid, tcon, path, in smb2_set_ea()
1286 rc = smb2_query_info_compound(xid, tcon, utf16_path, in smb2_set_ea()
1321 oparms.tcon = tcon; in smb2_set_ea()
1328 rc = SMB2_open_init(tcon, server, in smb2_set_ea()
1332 smb2_set_next_command(tcon, &rqst[0]); in smb2_set_ea()
1355 rc = SMB2_set_info_init(tcon, server, in smb2_set_ea()
1360 smb2_set_next_command(tcon, &rqst[1]); in smb2_set_ea()
1368 rc = SMB2_close_init(tcon, server, in smb2_set_ea()
1397 smb2_clear_stats(struct cifs_tcon *tcon) in smb2_clear_stats() argument
1402 atomic_set(&tcon->stats.smb2_stats.smb2_com_sent[i], 0); in smb2_clear_stats()
1403 atomic_set(&tcon->stats.smb2_stats.smb2_com_failed[i], 0); in smb2_clear_stats()
1408 smb2_dump_share_caps(struct seq_file *m, struct cifs_tcon *tcon) in smb2_dump_share_caps() argument
1411 if (tcon->capabilities & SMB2_SHARE_CAP_DFS) in smb2_dump_share_caps()
1413 if (tcon->capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY) in smb2_dump_share_caps()
1415 if (tcon->capabilities & SMB2_SHARE_CAP_SCALEOUT) in smb2_dump_share_caps()
1417 if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) in smb2_dump_share_caps()
1419 if (tcon->capabilities & SMB2_SHARE_CAP_ASYMMETRIC) in smb2_dump_share_caps()
1421 if (tcon->capabilities == 0) in smb2_dump_share_caps()
1423 if (tcon->ss_flags & SSINFO_FLAGS_ALIGNED_DEVICE) in smb2_dump_share_caps()
1425 if (tcon->ss_flags & SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE) in smb2_dump_share_caps()
1427 if (tcon->ss_flags & SSINFO_FLAGS_NO_SEEK_PENALTY) in smb2_dump_share_caps()
1429 if (tcon->ss_flags & SSINFO_FLAGS_TRIM_ENABLED) in smb2_dump_share_caps()
1432 seq_printf(m, "\tShare Flags: 0x%x", tcon->share_flags); in smb2_dump_share_caps()
1433 seq_printf(m, "\n\ttid: 0x%x", tcon->tid); in smb2_dump_share_caps()
1434 if (tcon->perf_sector_size) in smb2_dump_share_caps()
1436 tcon->perf_sector_size); in smb2_dump_share_caps()
1437 seq_printf(m, "\tMaximal Access: 0x%x", tcon->maximal_access); in smb2_dump_share_caps()
1441 smb2_print_stats(struct seq_file *m, struct cifs_tcon *tcon) in smb2_print_stats() argument
1443 atomic_t *sent = tcon->stats.smb2_stats.smb2_com_sent; in smb2_print_stats()
1444 atomic_t *failed = tcon->stats.smb2_stats.smb2_com_failed; in smb2_print_stats()
1451 (long long)(tcon->bytes_read), in smb2_print_stats()
1452 (long long)(tcon->bytes_written)); in smb2_print_stats()
1454 atomic_read(&tcon->num_local_opens), in smb2_print_stats()
1455 atomic_read(&tcon->num_remote_opens)); in smb2_print_stats()
1519 smb2_close_file(const unsigned int xid, struct cifs_tcon *tcon, in smb2_close_file() argument
1522 SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid); in smb2_close_file()
1526 smb2_close_getattr(const unsigned int xid, struct cifs_tcon *tcon, in smb2_close_getattr() argument
1533 rc = __SMB2_close(xid, tcon, cfile->fid.persistent_fid, in smb2_close_getattr()
1565 SMB2_request_res_key(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_request_res_key() argument
1573 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, in SMB2_request_res_key()
1579 pr_warn_once("Server share %s does not support copy range\n", tcon->treeName); in SMB2_request_res_key()
1609 struct cifs_tcon *tcon, in smb2_ioctl_query_info() argument
1617 struct cifs_ses *ses = tcon->ses; in smb2_ioctl_query_info()
1656 if (smb3_encryption_required(tcon)) in smb2_ioctl_query_info()
1671 oparms.tcon = tcon; in smb2_ioctl_query_info()
1698 rc = SMB2_open_init(tcon, server, in smb2_ioctl_query_info()
1702 smb2_set_next_command(tcon, &rqst[0]); in smb2_ioctl_query_info()
1713 rc = SMB2_ioctl_init(tcon, server, in smb2_ioctl_query_info()
1733 rc = SMB2_set_info_init(tcon, server, in smb2_ioctl_query_info()
1744 rc = SMB2_query_info_init(tcon, server, in smb2_ioctl_query_info()
1758 smb2_set_next_command(tcon, &rqst[1]); in smb2_ioctl_query_info()
1765 rc = SMB2_close_init(tcon, server, in smb2_ioctl_query_info()
1838 struct cifs_tcon *tcon; in smb2_copychunk_range() local
1863 tcon = tlink_tcon(trgtfile->tlink); in smb2_copychunk_range()
1869 cpu_to_le32(min_t(u32, len, tcon->max_bytes_chunk)); in smb2_copychunk_range()
1874 rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid, in smb2_copychunk_range()
1938 tcon->max_bytes_chunk) in smb2_copychunk_range()
1939 tcon->max_bytes_chunk = in smb2_copychunk_range()
1960 smb2_flush_file(const unsigned int xid, struct cifs_tcon *tcon, in smb2_flush_file() argument
1963 return SMB2_flush(xid, tcon, fid->persistent_fid, fid->volatile_fid); in smb2_flush_file()
2008 static bool smb2_set_sparse(const unsigned int xid, struct cifs_tcon *tcon, in smb2_set_sparse() argument
2033 if (tcon->broken_sparse_sup) in smb2_set_sparse()
2036 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb2_set_sparse()
2041 tcon->broken_sparse_sup = true; in smb2_set_sparse()
2055 smb2_set_file_size(const unsigned int xid, struct cifs_tcon *tcon, in smb2_set_file_size() argument
2071 smb2_set_sparse(xid, tcon, cfile, inode, set_sparse); in smb2_set_file_size()
2074 return SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid, in smb2_set_file_size()
2088 struct cifs_tcon *tcon = tlink_tcon(trgtfile->tlink); in smb2_duplicate_extents() local
2091 if ((le32_to_cpu(tcon->fsAttrInfo.Attributes) & in smb2_duplicate_extents()
2105 rc = smb2_set_file_size(xid, tcon, trgtfile, dest_off + len, false); in smb2_duplicate_extents()
2118 rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid, in smb2_duplicate_extents()
2135 smb2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, in smb2_set_compression() argument
2138 return SMB2_set_compression(xid, tcon, cfile->fid.persistent_fid, in smb2_set_compression()
2143 smb3_set_integrity(const unsigned int xid, struct cifs_tcon *tcon, in smb3_set_integrity() argument
2153 return SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_set_integrity()
2174 smb3_enum_snapshots(const unsigned int xid, struct cifs_tcon *tcon, in smb3_enum_snapshots() argument
2206 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_enum_snapshots()
2268 struct cifs_tcon *tcon; in smb3_notify() local
2292 tcon = cifs_sb_master_tcon(cifs_sb); in smb3_notify()
2293 oparms.tcon = tcon; in smb3_notify()
2305 rc = SMB2_change_notify(xid, tcon, fid.persistent_fid, fid.volatile_fid, in smb3_notify()
2308 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb3_notify()
2319 smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_dir_first() argument
2335 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_query_dir_first()
2342 if (smb3_encryption_required(tcon)) in smb2_query_dir_first()
2354 oparms.tcon = tcon; in smb2_query_dir_first()
2361 rc = SMB2_open_init(tcon, server, in smb2_query_dir_first()
2365 smb2_set_next_command(tcon, &rqst[0]); in smb2_query_dir_first()
2375 rc = SMB2_query_directory_init(xid, tcon, server, in smb2_query_dir_first()
2385 rc = compound_send_recv(xid, tcon->ses, server, in smb2_query_dir_first()
2403 SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid); in smb2_query_dir_first()
2406 tcon->tid, tcon->ses->Suid, 0, 0, rc); in smb2_query_dir_first()
2410 atomic_inc(&tcon->num_remote_opens); in smb2_query_dir_first()
2415 tcon->tid, tcon->ses->Suid, 0, 0); in smb2_query_dir_first()
2421 rc = smb2_parse_query_directory(tcon, &rsp_iov[1], resp_buftype[1], in smb2_query_dir_first()
2424 trace_smb3_query_dir_err(xid, fid->persistent_fid, tcon->tid, in smb2_query_dir_first()
2425 tcon->ses->Suid, 0, 0, rc); in smb2_query_dir_first()
2430 trace_smb3_query_dir_done(xid, fid->persistent_fid, tcon->tid, in smb2_query_dir_first()
2431 tcon->ses->Suid, 0, srch_inf->entries_in_buffer); in smb2_query_dir_first()
2443 smb2_query_dir_next(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_dir_next() argument
2447 return SMB2_query_directory(xid, tcon, fid->persistent_fid, in smb2_query_dir_next()
2452 smb2_close_dir(const unsigned int xid, struct cifs_tcon *tcon, in smb2_close_dir() argument
2455 return SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid); in smb2_close_dir()
2524 struct cifs_tcon *tcon; in smb2_is_network_name_deleted() local
2533 tcon = list_entry(tmp1, struct cifs_tcon, tcon_list); in smb2_is_network_name_deleted()
2534 if (tcon->tid == le32_to_cpu(shdr->Id.SyncId.TreeId)) { in smb2_is_network_name_deleted()
2535 tcon->need_reconnect = true; in smb2_is_network_name_deleted()
2538 tcon->treeName); in smb2_is_network_name_deleted()
2547 smb2_oplock_response(struct cifs_tcon *tcon, struct cifs_fid *fid, in smb2_oplock_response() argument
2550 if (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LEASING) in smb2_oplock_response()
2551 return SMB2_lease_break(0, tcon, cinode->lease_key, in smb2_oplock_response()
2554 return SMB2_oplock_break(0, tcon, fid->persistent_fid, in smb2_oplock_response()
2575 smb2_set_next_command(struct cifs_tcon *tcon, struct smb_rqst *rqst) in smb2_set_next_command() argument
2578 struct cifs_ses *ses = tcon->ses; in smb2_set_next_command()
2596 if (!smb3_encryption_required(tcon)) { in smb2_set_next_command()
2636 smb2_query_info_compound(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_info_compound() argument
2642 struct cifs_ses *ses = tcon->ses; in smb2_query_info_compound()
2656 if (smb3_encryption_required(tcon)) in smb2_query_info_compound()
2667 oparms.tcon = tcon; in smb2_query_info_compound()
2674 rc = SMB2_open_init(tcon, server, in smb2_query_info_compound()
2678 smb2_set_next_command(tcon, &rqst[0]); in smb2_query_info_compound()
2684 rc = SMB2_query_info_init(tcon, server, in smb2_query_info_compound()
2691 smb2_set_next_command(tcon, &rqst[1]); in smb2_query_info_compound()
2698 rc = SMB2_close_init(tcon, server, in smb2_query_info_compound()
2710 tcon->need_reconnect = true; in smb2_query_info_compound()
2712 tcon->treeName); in smb2_query_info_compound()
2729 smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon, in smb2_queryfs() argument
2740 rc = smb2_query_info_compound(xid, tcon, &utf16_path, in smb2_queryfs()
2766 smb311_queryfs(const unsigned int xid, struct cifs_tcon *tcon, in smb311_queryfs() argument
2775 if (!tcon->posix_extensions) in smb311_queryfs()
2776 return smb2_queryfs(xid, tcon, cifs_sb, buf); in smb311_queryfs()
2778 oparms.tcon = tcon; in smb311_queryfs()
2790 rc = SMB311_posix_qfs_info(xid, tcon, fid.persistent_fid, in smb311_queryfs()
2793 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in smb311_queryfs()
2843 struct cifs_tcon *tcon; in smb2_get_dfs_refer() local
2854 tcon = ses->tcon_ipc; in smb2_get_dfs_refer()
2855 if (tcon == NULL) { in smb2_get_dfs_refer()
2857 tcon = list_first_entry_or_null(&ses->tcon_list, in smb2_get_dfs_refer()
2860 if (tcon) in smb2_get_dfs_refer()
2861 tcon->tc_count++; in smb2_get_dfs_refer()
2865 if (tcon == NULL) { in smb2_get_dfs_refer()
2894 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in smb2_get_dfs_refer()
2920 if (tcon && !tcon->ipc) { in smb2_get_dfs_refer()
2923 tcon->tc_count--; in smb2_get_dfs_refer()
2925 WARN_ON(tcon->tc_count < 0); in smb2_get_dfs_refer()
3031 smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_symlink() argument
3043 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_query_symlink()
3065 if (smb3_encryption_required(tcon)) in smb2_query_symlink()
3082 oparms.tcon = tcon; in smb2_query_symlink()
3089 rc = SMB2_open_init(tcon, server, in smb2_query_symlink()
3093 smb2_set_next_command(tcon, &rqst[0]); in smb2_query_symlink()
3101 rc = SMB2_ioctl_init(tcon, server, in smb2_query_symlink()
3111 smb2_set_next_command(tcon, &rqst[1]); in smb2_query_symlink()
3120 rc = SMB2_close_init(tcon, server, in smb2_query_symlink()
3127 rc = compound_send_recv(xid, tcon->ses, server, in smb2_query_symlink()
3220 smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon, in smb2_query_reparse_tag() argument
3229 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_query_reparse_tag()
3243 if (smb3_encryption_required(tcon)) in smb2_query_reparse_tag()
3263 oparms.tcon = tcon; in smb2_query_reparse_tag()
3270 rc = SMB2_open_init(tcon, server, in smb2_query_reparse_tag()
3274 smb2_set_next_command(tcon, &rqst[0]); in smb2_query_reparse_tag()
3282 rc = SMB2_ioctl_init(tcon, server, in smb2_query_reparse_tag()
3292 smb2_set_next_command(tcon, &rqst[1]); in smb2_query_reparse_tag()
3301 rc = SMB2_close_init(tcon, server, in smb2_query_reparse_tag()
3308 rc = compound_send_recv(xid, tcon->ses, server, in smb2_query_reparse_tag()
3383 struct cifs_tcon *tcon; in get_smb2_acl_by_path() local
3393 tcon = tlink_tcon(tlink); in get_smb2_acl_by_path()
3403 oparms.tcon = tcon; in get_smb2_acl_by_path()
3425 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in get_smb2_acl_by_path()
3444 struct cifs_tcon *tcon; in set_smb2_acl() local
3455 tcon = tlink_tcon(tlink); in set_smb2_acl()
3472 oparms.tcon = tcon; in set_smb2_acl()
3486 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); in set_smb2_acl()
3513 static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon, in smb3_zero_range() argument
3516 struct cifs_ses *ses = tcon->ses; in smb3_zero_range()
3530 trace_smb3_zero_enter(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_zero_range()
3544 tcon->tid, ses->Suid, offset, len, rc); in smb3_zero_range()
3554 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_zero_range()
3567 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid, in smb3_zero_range()
3574 trace_smb3_zero_err(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_zero_range()
3577 trace_smb3_zero_done(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_zero_range()
3582 static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon, in smb3_punch_hole() argument
3598 if (!smb2_set_sparse(xid, tcon, cfile, inode, set_sparse)) { in smb3_punch_hole()
3616 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_punch_hole()
3627 struct cifs_tcon *tcon, in smb3_simple_fallocate_write_range() argument
3639 io_parms.tcon = tcon; in smb3_simple_fallocate_write_range()
3664 struct cifs_tcon *tcon, in smb3_simple_fallocate_range() argument
3676 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_simple_fallocate_range()
3697 rc = smb3_simple_fallocate_write_range(xid, tcon, in smb3_simple_fallocate_range()
3716 rc = smb3_simple_fallocate_write_range(xid, tcon, in smb3_simple_fallocate_range()
3747 static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon, in smb3_simple_falloc() argument
3762 trace_smb3_falloc_enter(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_simple_falloc()
3763 tcon->ses->Suid, off, len); in smb3_simple_falloc()
3768 tcon->tid, tcon->ses->Suid, off, len, rc); in smb3_simple_falloc()
3782 smb2_set_sparse(xid, tcon, cfile, inode, false); in smb3_simple_falloc()
3785 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid, in smb3_simple_falloc()
3840 rc = smb3_simple_fallocate_range(xid, tcon, cfile, in smb3_simple_falloc()
3859 smb2_set_sparse(xid, tcon, cfile, inode, false); in smb3_simple_falloc()
3864 trace_smb3_falloc_err(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_simple_falloc()
3865 tcon->ses->Suid, off, len, rc); in smb3_simple_falloc()
3867 trace_smb3_falloc_done(xid, cfile->fid.persistent_fid, tcon->tid, in smb3_simple_falloc()
3868 tcon->ses->Suid, off, len); in smb3_simple_falloc()
3874 static long smb3_collapse_range(struct file *file, struct cifs_tcon *tcon, in smb3_collapse_range() argument
3896 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid, in smb3_collapse_range()
3907 static long smb3_insert_range(struct file *file, struct cifs_tcon *tcon, in smb3_insert_range() argument
3926 rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid, in smb3_insert_range()
3935 rc = smb3_zero_range(file, tcon, off, len, 1); in smb3_insert_range()
3945 static loff_t smb3_llseek(struct file *file, struct cifs_tcon *tcon, loff_t offset, int whence) in smb3_llseek() argument
3975 smb2_flush_file(xid, tcon, &wrcfile->fid); in smb3_llseek()
3988 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_llseek()
4029 static int smb3_fiemap(struct cifs_tcon *tcon, in smb3_fiemap() argument
4048 rc = SMB2_ioctl(xid, tcon, cfile->fid.persistent_fid, in smb3_fiemap()
4104 static long smb3_fallocate(struct file *file, struct cifs_tcon *tcon, int mode, in smb3_fallocate() argument
4109 return smb3_punch_hole(file, tcon, off, len); in smb3_fallocate()
4112 return smb3_zero_range(file, tcon, off, len, true); in smb3_fallocate()
4113 return smb3_zero_range(file, tcon, off, len, false); in smb3_fallocate()
4115 return smb3_simple_falloc(file, tcon, off, len, true); in smb3_fallocate()
4117 return smb3_collapse_range(file, tcon, off, len); in smb3_fallocate()
4119 return smb3_insert_range(file, tcon, off, len); in smb3_fallocate()
4121 return smb3_simple_falloc(file, tcon, off, len, false); in smb3_fallocate()
5266 struct dentry *dentry, struct cifs_tcon *tcon, in smb2_make_node() argument
5306 oparms.tcon = tcon; in smb2_make_node()
5316 if (tcon->ses->server->oplocks) in smb2_make_node()
5320 rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, buf); in smb2_make_node()
5331 io_parms.tcon = tcon; in smb2_make_node()
5340 rc = tcon->ses->server->ops->sync_write(xid, &fid, &io_parms, in smb2_make_node()
5346 rc = tcon->ses->server->ops->sync_write(xid, &fid, &io_parms, in smb2_make_node()
5349 tcon->ses->server->ops->close(xid, tcon, &fid); in smb2_make_node()