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()
177 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
185 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
235 oparms.tcon = tcon; in cifs_nt_open()
249 if (tcon->unix_ext) in cifs_nt_open()
257 server->ops->close(xid, tcon, fid); in cifs_nt_open()
300 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
301 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
342 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
350 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
351 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
360 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
404 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
405 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
414 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
420 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
434 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
450 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
455 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
456 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
461 server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
498 struct cifs_tcon *tcon; in cifs_open() local
514 tcon = tlink_tcon(tlink); in cifs_open()
515 server = tcon->ses->server; in cifs_open()
539 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
540 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
541 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
550 if (tcon->ses->serverNOS) in cifs_open()
552 tcon->ses->serverName, in cifs_open()
553 tcon->ses->serverNOS); in cifs_open()
554 tcon->broken_posix_open = true; in cifs_open()
573 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, in cifs_open()
584 server->ops->close(xid, tcon, &fid); in cifs_open()
592 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
606 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
628 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
638 if (cap_unix(tcon->ses) && in cifs_relock_file()
639 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
643 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
656 struct cifs_tcon *tcon; in cifs_reopen_file() local
677 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
678 server = tcon->ses->server; in cifs_reopen_file()
697 if (tcon->ses->server->oplocks) in cifs_reopen_file()
702 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
704 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
734 oparms.tcon = tcon; in cifs_reopen_file()
775 if (tcon->unix_ext) in cifs_reopen_file()
820 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
827 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
830 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
836 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
837 list_for_each(tmp, &tcon->openFileList) { in cifs_reopen_persistent_handles()
844 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
849 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
860 struct cifs_tcon *tcon; in cifs_closedir() local
870 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
871 server = tcon->ses->server; in cifs_closedir()
879 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1158 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1168 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1174 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1204 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1217 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1248 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1312 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1337 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1347 if (cap_unix(tcon->ses) && in cifs_push_locks()
1348 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1352 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1413 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1414 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
1428 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
1506 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
1518 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
1567 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
1591 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
1615 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
1616 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
1634 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
1708 struct cifs_tcon *tcon; in cifs_lock() local
1720 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
1723 tcon->ses->server); in cifs_lock()
1726 if (cap_unix(tcon->ses) && in cifs_lock()
1727 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
1776 struct cifs_tcon *tcon; in cifs_write() local
1786 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1787 server = tcon->ses->server; in cifs_write()
1817 io_parms.tcon = tcon; in cifs_write()
1838 cifs_stats_bytes_written(tcon, total_written); in cifs_write()
1987 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
1997 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
1998 list_for_each(tmp, &tcon->openFileList) { in cifs_get_writable_path()
2003 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2013 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2017 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2022 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2032 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2033 list_for_each(tmp, &tcon->openFileList) { in cifs_get_readable_path()
2038 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2048 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2053 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2515 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2538 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2540 server = tcon->ses->server; in cifs_strict_fsync()
2542 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2555 struct cifs_tcon *tcon; in cifs_fsync() local
2569 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2571 server = tcon->ses->server; in cifs_fsync()
2573 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2950 struct cifs_tcon *tcon; in collect_uncached_write_data() local
2955 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_write_data()
3016 cifs_stats_bytes_written(tcon, ctx->total_len); in collect_uncached_write_data()
3035 struct cifs_tcon *tcon; in __cifs_writev() local
3058 tcon = tlink_tcon(cfile->tlink); in __cifs_writev()
3060 if (!tcon->ses->server->ops->async_writev) in __cifs_writev()
3187 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
3195 if (cap_unix(tcon->ses) && in cifs_strict_writev()
3196 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) in cifs_strict_writev()
3760 struct cifs_tcon *tcon; in __cifs_readv() local
3781 tcon = tlink_tcon(cfile->tlink); in __cifs_readv()
3783 if (!tcon->ses->server->ops->async_readv) in __cifs_readv()
3874 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
3888 if (cap_unix(tcon->ses) && in cifs_strict_readv()
3889 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_readv()
3899 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3915 struct cifs_tcon *tcon; in cifs_read() local
3936 tcon = tlink_tcon(open_file->tlink); in cifs_read()
3937 server = tcon->ses->server; in cifs_read()
3962 if ((tcon->ses) && !(tcon->ses->capabilities & in cifs_read()
3963 tcon->ses->server->vals->cap_large_files)) { in cifs_read()
3973 io_parms.tcon = tcon; in cifs_read()
3989 cifs_stats_bytes_read(tcon, total_read); in cifs_read()
4637 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_oplock_break() local
4638 struct TCP_Server_Info *server = tcon->ses->server; in cifs_oplock_break()
4679 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, in cifs_oplock_break()