Lines Matching refs:tcon
124 struct cifs_tcon *tcon; in cifs_posix_open() local
138 tcon = tlink_tcon(tlink); in cifs_posix_open()
142 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
178 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
186 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
233 oparms.tcon = tcon; in cifs_nt_open()
248 if (tcon->unix_ext) in cifs_nt_open()
256 server->ops->close(xid, tcon, fid); in cifs_nt_open()
301 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
302 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
345 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
353 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
354 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
363 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
443 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
444 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
452 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
458 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
472 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
488 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
493 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
494 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
499 server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
501 server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
524 struct cifs_tcon *tcon; in cifs_open() local
540 tcon = tlink_tcon(tlink); in cifs_open()
541 server = tcon->ses->server; in cifs_open()
565 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
566 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
567 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
576 if (tcon->ses->serverNOS) in cifs_open()
578 tcon->ses->serverName, in cifs_open()
579 tcon->ses->serverNOS); in cifs_open()
580 tcon->broken_posix_open = true; in cifs_open()
599 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, in cifs_open()
610 server->ops->close(xid, tcon, &fid); in cifs_open()
618 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
632 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
654 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
664 if (cap_unix(tcon->ses) && in cifs_relock_file()
665 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
669 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
682 struct cifs_tcon *tcon; in cifs_reopen_file() local
703 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
704 server = tcon->ses->server; in cifs_reopen_file()
723 if (tcon->ses->server->oplocks) in cifs_reopen_file()
728 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
730 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
764 oparms.tcon = tcon; in cifs_reopen_file()
805 if (tcon->posix_extensions) in cifs_reopen_file()
807 else if (tcon->unix_ext) in cifs_reopen_file()
852 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
859 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
862 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
868 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
869 list_for_each(tmp, &tcon->openFileList) { in cifs_reopen_persistent_handles()
876 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
881 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
892 struct cifs_tcon *tcon; in cifs_closedir() local
902 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
903 server = tcon->ses->server; in cifs_closedir()
911 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1184 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1194 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1200 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1230 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1243 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1274 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1338 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1363 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1373 if (cap_unix(tcon->ses) && in cifs_push_locks()
1374 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1378 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1439 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1440 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
1454 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
1532 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
1544 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
1593 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
1617 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
1641 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
1642 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
1660 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
1734 struct cifs_tcon *tcon; in cifs_flock() local
1745 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
1748 tcon->ses->server); in cifs_flock()
1751 if (cap_unix(tcon->ses) && in cifs_flock()
1752 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
1780 struct cifs_tcon *tcon; in cifs_lock() local
1792 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
1795 tcon->ses->server); in cifs_lock()
1798 if (cap_unix(tcon->ses) && in cifs_lock()
1799 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
1848 struct cifs_tcon *tcon; in cifs_write() local
1858 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1859 server = tcon->ses->server; in cifs_write()
1889 io_parms.tcon = tcon; in cifs_write()
1910 cifs_stats_bytes_written(tcon, total_written); in cifs_write()
2062 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2073 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2074 list_for_each(tmp, &tcon->openFileList) { in cifs_get_writable_path()
2079 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2089 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2093 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2098 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2108 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2109 list_for_each(tmp, &tcon->openFileList) { in cifs_get_readable_path()
2114 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2124 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2129 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2593 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2618 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2620 server = tcon->ses->server; in cifs_strict_fsync()
2629 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2634 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2646 struct cifs_tcon *tcon; in cifs_fsync() local
2663 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2665 server = tcon->ses->server; in cifs_fsync()
2674 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2679 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
3062 struct cifs_tcon *tcon; in collect_uncached_write_data() local
3067 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_write_data()
3128 cifs_stats_bytes_written(tcon, ctx->total_len); in collect_uncached_write_data()
3147 struct cifs_tcon *tcon; in __cifs_writev() local
3170 tcon = tlink_tcon(cfile->tlink); in __cifs_writev()
3172 if (!tcon->ses->server->ops->async_writev) in __cifs_writev()
3299 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
3307 if (cap_unix(tcon->ses) && in cifs_strict_writev()
3308 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) in cifs_strict_writev()
3881 struct cifs_tcon *tcon; in __cifs_readv() local
3902 tcon = tlink_tcon(cfile->tlink); in __cifs_readv()
3904 if (!tcon->ses->server->ops->async_readv) in __cifs_readv()
3995 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
4009 if (cap_unix(tcon->ses) && in cifs_strict_readv()
4010 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_readv()
4020 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
4036 struct cifs_tcon *tcon; in cifs_read() local
4057 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4058 server = cifs_pick_channel(tcon->ses); in cifs_read()
4083 if (!(tcon->ses->capabilities & in cifs_read()
4084 tcon->ses->server->vals->cap_large_files)) { in cifs_read()
4094 io_parms.tcon = tcon; in cifs_read()
4111 cifs_stats_bytes_read(tcon, total_read); in cifs_read()
4763 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_oplock_break() local
4764 struct TCP_Server_Info *server = tcon->ses->server; in cifs_oplock_break()
4809 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, in cifs_oplock_break()