Lines Matching defs:tcon

170 cifs_mark_open_files_invalid(struct cifs_tcon *tcon)
177 spin_lock(&tcon->tc_lock);
178 if (tcon->need_reconnect)
179 tcon->status = TID_NEED_RECON;
181 if (tcon->status != TID_NEED_RECON) {
182 spin_unlock(&tcon->tc_lock);
185 tcon->status = TID_IN_FILES_INVALIDATE;
186 spin_unlock(&tcon->tc_lock);
189 spin_lock(&tcon->open_file_lock);
190 list_for_each_safe(tmp, tmp1, &tcon->openFileList) {
195 spin_unlock(&tcon->open_file_lock);
197 invalidate_all_cached_dirs(tcon);
198 spin_lock(&tcon->tc_lock);
199 if (tcon->status == TID_IN_FILES_INVALIDATE)
200 tcon->status = TID_NEED_TCON;
201 spin_unlock(&tcon->tc_lock);
205 * to this tcon.
288 struct cifs_tcon *tcon;
302 tcon = tlink_tcon(tlink);
306 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data,
342 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock,
349 struct TCP_Server_Info *server = tcon->ses->server;
393 .tcon = tcon,
407 if (tcon->unix_ext)
415 server->ops->close(xid, tcon, fid);
458 struct cifs_tcon *tcon = tlink_tcon(tlink);
459 struct TCP_Server_Info *server = tcon->ses->server;
513 spin_lock(&tcon->open_file_lock);
521 list_add(&cfile->tlist, &tcon->openFileList);
522 atomic_inc(&tcon->num_local_opens);
531 spin_unlock(&tcon->open_file_lock);
601 * server. Must be called without holding tcon->open_file_lock,
617 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
618 struct TCP_Server_Info *server = tcon->ses->server;
626 spin_lock(&tcon->open_file_lock);
632 spin_unlock(&tcon->open_file_lock);
646 atomic_dec(&tcon->num_local_opens);
662 spin_unlock(&tcon->open_file_lock);
667 if (!tcon->need_reconnect && !cifs_file->invalidHandle) {
668 struct TCP_Server_Info *server = tcon->ses->server;
673 server->ops->close_getattr(xid, tcon, cifs_file);
675 server->ops->close(xid, tcon, &cifs_file->fid);
698 struct cifs_tcon *tcon;
721 tcon = tlink_tcon(tlink);
722 server = tcon->ses->server;
743 rc = cifs_get_readable_path(tcon, full_path, &cfile);
762 if (!tcon->broken_posix_open && tcon->unix_ext &&
763 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &
764 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
773 if (tcon->ses->serverNOS)
775 tcon->ses->ip_addr,
776 tcon->ses->serverNOS);
777 tcon->broken_posix_open = true;
797 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, file->f_flags, &oplock, &fid,
808 server->ops->close(xid, tcon, &fid);
815 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) {
829 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid,
863 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
877 if (cap_unix(tcon->ses) &&
878 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
883 rc = tcon->ses->server->ops->push_mand_locks(cfile);
896 struct cifs_tcon *tcon;
917 tcon = tlink_tcon(cfile->tlink);
918 server = tcon->ses->server;
938 if (tcon->ses->server->oplocks)
944 if (tcon->unix_ext && cap_unix(tcon->ses) &&
946 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
982 .tcon = tcon,
1026 if (tcon->posix_extensions)
1028 else if (tcon->unix_ext)
1126 cifs_reopen_persistent_handles(struct cifs_tcon *tcon)
1131 if (!tcon->use_persistent || !tcon->need_reopen_files)
1134 tcon->need_reopen_files = false;
1140 spin_lock(&tcon->open_file_lock);
1141 list_for_each_entry(open_file, &tcon->openFileList, tlist) {
1147 spin_unlock(&tcon->open_file_lock);
1151 tcon->need_reopen_files = true;
1162 struct cifs_tcon *tcon;
1172 tcon = tlink_tcon(cfile->tlink);
1173 server = tcon->ses->server;
1181 rc = server->ops->close_dir(xid, tcon, &cfile->fid);
1455 struct cifs_tcon *tcon;
1465 tcon = tlink_tcon(cfile->tlink);
1471 max_buf = tcon->ses->server->maxBuf;
1501 stored_rc = cifs_lockv(xid, tcon,
1514 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid,
1547 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1611 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid,
1636 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1650 if (cap_unix(tcon->ses) &&
1651 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
1656 rc = tcon->ses->server->ops->push_mand_locks(cfile);
1717 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1718 struct TCP_Server_Info *server = tcon->ses->server;
1733 rc = CIFSSMBPosixLock(xid, tcon, netfid,
1813 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1825 max_buf = tcon->ses->server->maxBuf;
1874 stored_rc = cifs_lockv(xid, tcon,
1898 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid,
1923 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
1924 struct TCP_Server_Info *server = tcon->ses->server;
1943 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid,
2017 struct cifs_tcon *tcon;
2030 tcon = tlink_tcon(cfile->tlink);
2033 tcon->ses->server);
2036 if (cap_unix(tcon->ses) &&
2037 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
2066 struct cifs_tcon *tcon;
2078 tcon = tlink_tcon(cfile->tlink);
2081 tcon->ses->server);
2085 if (cap_unix(tcon->ses) &&
2086 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
2135 struct cifs_tcon *tcon;
2145 tcon = tlink_tcon(open_file->tlink);
2146 server = tcon->ses->server;
2176 io_parms.tcon = tcon;
2197 cifs_stats_bytes_written(tcon, total_written);
2351 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
2360 spin_lock(&tcon->open_file_lock);
2361 list_for_each_entry(cfile, &tcon->openFileList, tlist) {
2365 spin_unlock(&tcon->open_file_lock);
2373 spin_unlock(&tcon->open_file_lock);
2378 spin_unlock(&tcon->open_file_lock);
2384 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name,
2392 spin_lock(&tcon->open_file_lock);
2393 list_for_each_entry(cfile, &tcon->openFileList, tlist) {
2397 spin_unlock(&tcon->open_file_lock);
2405 spin_unlock(&tcon->open_file_lock);
2411 spin_unlock(&tcon->open_file_lock);
3145 struct cifs_tcon *tcon;
3170 tcon = tlink_tcon(smbfile->tlink);
3172 server = tcon->ses->server;
3181 rc = server->ops->flush(xid, tcon, &smbfile->fid);
3186 rc = server->ops->flush(xid, tcon, &smbfile->fid);
3198 struct cifs_tcon *tcon;
3215 tcon = tlink_tcon(smbfile->tlink);
3217 server = tcon->ses->server;
3226 rc = server->ops->flush(xid, tcon, &smbfile->fid);
3231 rc = server->ops->flush(xid, tcon, &smbfile->fid);
3519 struct cifs_tcon *tcon;
3524 tcon = tlink_tcon(ctx->cfile->tlink);
3585 cifs_stats_bytes_written(tcon, ctx->total_len);
3604 struct cifs_tcon *tcon;
3615 tcon = tlink_tcon(cfile->tlink);
3617 if (!tcon->ses->server->ops->async_writev)
3778 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
3786 if (cap_unix(tcon->ses) &&
3787 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability))
4133 struct cifs_tcon *tcon;
4144 tcon = tlink_tcon(cfile->tlink);
4146 if (!tcon->ses->server->ops->async_readv)
4273 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
4287 if (cap_unix(tcon->ses) &&
4288 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) &&
4298 tcon->ses->server->vals->shared_lock_type,
4314 struct cifs_tcon *tcon;
4335 tcon = tlink_tcon(open_file->tlink);
4336 server = cifs_pick_channel(tcon->ses);
4361 if (!(tcon->ses->capabilities &
4362 tcon->ses->server->vals->cap_large_files)) {
4372 io_parms.tcon = tcon;
4389 cifs_stats_bytes_read(tcon, total_read);
4919 struct cifs_tcon *tcon;
4933 tcon = tlink_tcon(tlink);
4934 server = tcon->ses->server;
4990 rc = server->ops->oplock_response(tcon, persistent_fid,