Lines Matching refs:tcon
113 struct cifs_tcon *tcon; in cifs_posix_open() local
127 tcon = tlink_tcon(tlink); in cifs_posix_open()
131 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
167 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
175 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
222 oparms.tcon = tcon; in cifs_nt_open()
237 if (tcon->unix_ext) in cifs_nt_open()
245 server->ops->close(xid, tcon, fid); in cifs_nt_open()
290 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
291 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
336 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
344 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
345 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
354 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
441 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
442 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
450 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
456 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
470 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
486 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
491 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
492 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
497 server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
499 server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
522 struct cifs_tcon *tcon; in cifs_open() local
544 tcon = tlink_tcon(tlink); in cifs_open()
545 server = tcon->ses->server; in cifs_open()
566 rc = cifs_get_readable_path(tcon, full_path, &cfile); in cifs_open()
584 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
585 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
586 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
595 if (tcon->ses->serverNOS) in cifs_open()
597 tcon->ses->ip_addr, in cifs_open()
598 tcon->ses->serverNOS); in cifs_open()
599 tcon->broken_posix_open = true; in cifs_open()
618 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, in cifs_open()
629 server->ops->close(xid, tcon, &fid); in cifs_open()
637 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
651 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
673 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
683 if (cap_unix(tcon->ses) && in cifs_relock_file()
684 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
688 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
701 struct cifs_tcon *tcon; in cifs_reopen_file() local
722 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
723 server = tcon->ses->server; in cifs_reopen_file()
743 if (tcon->ses->server->oplocks) in cifs_reopen_file()
748 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
750 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
784 oparms.tcon = tcon; in cifs_reopen_file()
825 if (tcon->posix_extensions) in cifs_reopen_file()
827 else if (tcon->unix_ext) in cifs_reopen_file()
923 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
930 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
933 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
939 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
940 list_for_each(tmp, &tcon->openFileList) { in cifs_reopen_persistent_handles()
947 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
952 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
963 struct cifs_tcon *tcon; in cifs_closedir() local
973 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
974 server = tcon->ses->server; in cifs_closedir()
982 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1255 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1265 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1271 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1301 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1314 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1345 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1409 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1434 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1444 if (cap_unix(tcon->ses) && in cifs_push_locks()
1445 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1449 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1510 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1511 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
1525 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
1603 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
1615 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
1664 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
1688 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
1712 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
1713 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
1731 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
1805 struct cifs_tcon *tcon; in cifs_flock() local
1816 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
1819 tcon->ses->server); in cifs_flock()
1822 if (cap_unix(tcon->ses) && in cifs_flock()
1823 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
1851 struct cifs_tcon *tcon; in cifs_lock() local
1863 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
1866 tcon->ses->server); in cifs_lock()
1870 if (cap_unix(tcon->ses) && in cifs_lock()
1871 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
1920 struct cifs_tcon *tcon; in cifs_write() local
1930 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1931 server = tcon->ses->server; in cifs_write()
1961 io_parms.tcon = tcon; in cifs_write()
1982 cifs_stats_bytes_written(tcon, total_written); in cifs_write()
2136 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2145 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2146 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_writable_path()
2150 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2158 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2163 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2169 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2177 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2178 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_readable_path()
2182 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2190 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2196 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2667 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2692 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2694 server = tcon->ses->server; in cifs_strict_fsync()
2696 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2709 struct cifs_tcon *tcon; in cifs_fsync() local
2725 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2727 server = tcon->ses->server; in cifs_fsync()
2729 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
3113 struct cifs_tcon *tcon; in collect_uncached_write_data() local
3118 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_write_data()
3179 cifs_stats_bytes_written(tcon, ctx->total_len); in collect_uncached_write_data()
3198 struct cifs_tcon *tcon; in __cifs_writev() local
3221 tcon = tlink_tcon(cfile->tlink); in __cifs_writev()
3223 if (!tcon->ses->server->ops->async_writev) in __cifs_writev()
3350 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
3358 if (cap_unix(tcon->ses) && in cifs_strict_writev()
3359 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) in cifs_strict_writev()
3932 struct cifs_tcon *tcon; in __cifs_readv() local
3953 tcon = tlink_tcon(cfile->tlink); in __cifs_readv()
3955 if (!tcon->ses->server->ops->async_readv) in __cifs_readv()
4046 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
4060 if (cap_unix(tcon->ses) && in cifs_strict_readv()
4061 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_readv()
4071 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
4087 struct cifs_tcon *tcon; in cifs_read() local
4108 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4109 server = cifs_pick_channel(tcon->ses); in cifs_read()
4134 if (!(tcon->ses->capabilities & in cifs_read()
4135 tcon->ses->server->vals->cap_large_files)) { in cifs_read()
4145 io_parms.tcon = tcon; in cifs_read()
4162 cifs_stats_bytes_read(tcon, total_read); in cifs_read()
4821 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_oplock_break() local
4822 struct TCP_Server_Info *server = tcon->ses->server; in cifs_oplock_break()
4885 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, in cifs_oplock_break()