Lines Matching defs:tcon
124 struct cifs_tcon *tcon;
138 tcon = tlink_tcon(tlink);
142 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data,
178 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock,
186 struct TCP_Server_Info *server = tcon->ses->server;
233 oparms.tcon = tcon;
248 if (tcon->unix_ext)
256 server->ops->close(xid, tcon, fid);
301 struct cifs_tcon *tcon = tlink_tcon(tlink);
302 struct TCP_Server_Info *server = tcon->ses->server;
345 spin_lock(&tcon->open_file_lock);
353 list_add(&cfile->tlist, &tcon->openFileList);
354 atomic_inc(&tcon->num_local_opens);
363 spin_unlock(&tcon->open_file_lock);
430 * server. Must be called without holding tcon->open_file_lock,
443 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
444 struct TCP_Server_Info *server = tcon->ses->server;
452 spin_lock(&tcon->open_file_lock);
458 spin_unlock(&tcon->open_file_lock);
472 atomic_dec(&tcon->num_local_opens);
488 spin_unlock(&tcon->open_file_lock);
493 if (!tcon->need_reconnect && !cifs_file->invalidHandle) {
494 struct TCP_Server_Info *server = tcon->ses->server;
499 server->ops->close_getattr(xid, tcon, cifs_file);
501 server->ops->close(xid, tcon, &cifs_file->fid);
524 struct cifs_tcon *tcon;
540 tcon = tlink_tcon(tlink);
541 server = tcon->ses->server;
565 if (!tcon->broken_posix_open && tcon->unix_ext &&
566 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &
567 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
576 if (tcon->ses->serverNOS)
578 tcon->ses->serverName,
579 tcon->ses->serverNOS);
580 tcon->broken_posix_open = true;
599 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon,
610 server->ops->close(xid, tcon, &fid);
618 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) {
632 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid,
654 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
664 if (cap_unix(tcon->ses) &&
665 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
669 rc = tcon->ses->server->ops->push_mand_locks(cfile);
682 struct cifs_tcon *tcon;
703 tcon = tlink_tcon(cfile->tlink);
704 server = tcon->ses->server;
723 if (tcon->ses->server->oplocks)
728 if (tcon->unix_ext && cap_unix(tcon->ses) &&
730 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
764 oparms.tcon = tcon;
805 if (tcon->posix_extensions)
807 else if (tcon->unix_ext)
852 cifs_reopen_persistent_handles(struct cifs_tcon *tcon)
859 if (!tcon->use_persistent || !tcon->need_reopen_files)
862 tcon->need_reopen_files = false;
868 spin_lock(&tcon->open_file_lock);
869 list_for_each(tmp, &tcon->openFileList) {
876 spin_unlock(&tcon->open_file_lock);
881 tcon->need_reopen_files = true;
892 struct cifs_tcon *tcon;
902 tcon = tlink_tcon(cfile->tlink);
903 server = tcon->ses->server;
911 rc = server->ops->close_dir(xid, tcon, &cfile->fid);
1184 struct cifs_tcon *tcon;
1194 tcon = tlink_tcon(cfile->tlink);
1200 max_buf = tcon->ses->server->maxBuf;
1230 stored_rc = cifs_lockv(xid, tcon,
1243 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid,
1274 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1338 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid,
1363 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1373 if (cap_unix(tcon->ses) &&
1374 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
1378 rc = tcon->ses->server->ops->push_mand_locks(cfile);
1439 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1440 struct TCP_Server_Info *server = tcon->ses->server;
1454 rc = CIFSSMBPosixLock(xid, tcon, netfid,
1532 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1544 max_buf = tcon->ses->server->maxBuf;
1593 stored_rc = cifs_lockv(xid, tcon,
1617 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid,
1641 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1642 struct TCP_Server_Info *server = tcon->ses->server;
1660 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid,
1734 struct cifs_tcon *tcon;
1747 tcon = tlink_tcon(cfile->tlink);
1750 tcon->ses->server);
1753 if (cap_unix(tcon->ses) &&
1754 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
1783 struct cifs_tcon *tcon;
1795 tcon = tlink_tcon(cfile->tlink);
1798 tcon->ses->server);
1801 if (cap_unix(tcon->ses) &&
1802 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
1851 struct cifs_tcon *tcon;
1861 tcon = tlink_tcon(open_file->tlink);
1862 server = tcon->ses->server;
1892 io_parms.tcon = tcon;
1913 cifs_stats_bytes_written(tcon, total_written);
2065 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
2076 spin_lock(&tcon->open_file_lock);
2077 list_for_each(tmp, &tcon->openFileList) {
2082 spin_unlock(&tcon->open_file_lock);
2092 spin_unlock(&tcon->open_file_lock);
2096 spin_unlock(&tcon->open_file_lock);
2101 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name,
2111 spin_lock(&tcon->open_file_lock);
2112 list_for_each(tmp, &tcon->openFileList) {
2117 spin_unlock(&tcon->open_file_lock);
2127 spin_unlock(&tcon->open_file_lock);
2132 spin_unlock(&tcon->open_file_lock);
2596 struct cifs_tcon *tcon;
2621 tcon = tlink_tcon(smbfile->tlink);
2623 server = tcon->ses->server;
2632 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2637 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2649 struct cifs_tcon *tcon;
2666 tcon = tlink_tcon(smbfile->tlink);
2668 server = tcon->ses->server;
2677 rc = server->ops->flush(xid, tcon, &smbfile->fid);
2682 rc = server->ops->flush(xid, tcon, &smbfile->fid);
3065 struct cifs_tcon *tcon;
3070 tcon = tlink_tcon(ctx->cfile->tlink);
3131 cifs_stats_bytes_written(tcon, ctx->total_len);
3150 struct cifs_tcon *tcon;
3173 tcon = tlink_tcon(cfile->tlink);
3175 if (!tcon->ses->server->ops->async_writev)
3305 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
3313 if (cap_unix(tcon->ses) &&
3314 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability))
3887 struct cifs_tcon *tcon;
3908 tcon = tlink_tcon(cfile->tlink);
3910 if (!tcon->ses->server->ops->async_readv)
4010 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
4024 if (cap_unix(tcon->ses) &&
4025 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
4035 tcon->ses->server->vals->shared_lock_type,
4051 struct cifs_tcon *tcon;
4072 tcon = tlink_tcon(open_file->tlink);
4073 server = cifs_pick_channel(tcon->ses);
4098 if (!(tcon->ses->capabilities &
4099 tcon->ses->server->vals->cap_large_files)) {
4109 io_parms.tcon = tcon;
4126 cifs_stats_bytes_read(tcon, total_read);
4778 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
4779 struct TCP_Server_Info *server = tcon->ses->server;
4824 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid,