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()
232 oparms.tcon = tcon; in cifs_nt_open()
247 if (tcon->unix_ext) in cifs_nt_open()
255 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()
344 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
352 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
353 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
362 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
442 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
443 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
451 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
457 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
471 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
487 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
492 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
493 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
498 server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
500 server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
523 struct cifs_tcon *tcon; in cifs_open() local
539 tcon = tlink_tcon(tlink); in cifs_open()
540 server = tcon->ses->server; in cifs_open()
564 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
565 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
566 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
575 if (tcon->ses->serverNOS) in cifs_open()
577 tcon->ses->serverName, in cifs_open()
578 tcon->ses->serverNOS); in cifs_open()
579 tcon->broken_posix_open = true; in cifs_open()
598 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, in cifs_open()
609 server->ops->close(xid, tcon, &fid); in cifs_open()
617 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
631 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
653 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
663 if (cap_unix(tcon->ses) && in cifs_relock_file()
664 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
668 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
681 struct cifs_tcon *tcon; in cifs_reopen_file() local
702 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
703 server = tcon->ses->server; in cifs_reopen_file()
722 if (tcon->ses->server->oplocks) in cifs_reopen_file()
727 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
729 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
763 oparms.tcon = tcon; in cifs_reopen_file()
804 if (tcon->posix_extensions) in cifs_reopen_file()
806 else if (tcon->unix_ext) in cifs_reopen_file()
851 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
858 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
861 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
867 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
868 list_for_each(tmp, &tcon->openFileList) { in cifs_reopen_persistent_handles()
875 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
880 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
891 struct cifs_tcon *tcon; in cifs_closedir() local
901 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
902 server = tcon->ses->server; in cifs_closedir()
910 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1183 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1193 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1199 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1229 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1242 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1273 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1337 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1362 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1372 if (cap_unix(tcon->ses) && in cifs_push_locks()
1373 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1377 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1438 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1439 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
1453 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
1531 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
1543 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
1592 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
1616 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
1640 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
1641 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
1659 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
1733 struct cifs_tcon *tcon; in cifs_flock() local
1744 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
1747 tcon->ses->server); in cifs_flock()
1750 if (cap_unix(tcon->ses) && in cifs_flock()
1751 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
1779 struct cifs_tcon *tcon; in cifs_lock() local
1791 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
1794 tcon->ses->server); in cifs_lock()
1797 if (cap_unix(tcon->ses) && in cifs_lock()
1798 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
1847 struct cifs_tcon *tcon; in cifs_write() local
1857 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1858 server = tcon->ses->server; in cifs_write()
1888 io_parms.tcon = tcon; in cifs_write()
1909 cifs_stats_bytes_written(tcon, total_written); in cifs_write()
2061 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2072 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2073 list_for_each(tmp, &tcon->openFileList) { in cifs_get_writable_path()
2078 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2088 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2092 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2097 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2107 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2108 list_for_each(tmp, &tcon->openFileList) { in cifs_get_readable_path()
2113 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2123 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2128 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2592 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2617 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2619 server = tcon->ses->server; in cifs_strict_fsync()
2621 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2634 struct cifs_tcon *tcon; in cifs_fsync() local
2650 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2652 server = tcon->ses->server; in cifs_fsync()
2654 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
3038 struct cifs_tcon *tcon; in collect_uncached_write_data() local
3043 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_write_data()
3104 cifs_stats_bytes_written(tcon, ctx->total_len); in collect_uncached_write_data()
3123 struct cifs_tcon *tcon; in __cifs_writev() local
3146 tcon = tlink_tcon(cfile->tlink); in __cifs_writev()
3148 if (!tcon->ses->server->ops->async_writev) in __cifs_writev()
3275 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
3283 if (cap_unix(tcon->ses) && in cifs_strict_writev()
3284 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) in cifs_strict_writev()
3857 struct cifs_tcon *tcon; in __cifs_readv() local
3878 tcon = tlink_tcon(cfile->tlink); in __cifs_readv()
3880 if (!tcon->ses->server->ops->async_readv) in __cifs_readv()
3971 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
3985 if (cap_unix(tcon->ses) && in cifs_strict_readv()
3986 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_readv()
3996 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
4012 struct cifs_tcon *tcon; in cifs_read() local
4033 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4034 server = cifs_pick_channel(tcon->ses); in cifs_read()
4059 if (!(tcon->ses->capabilities & in cifs_read()
4060 tcon->ses->server->vals->cap_large_files)) { in cifs_read()
4070 io_parms.tcon = tcon; in cifs_read()
4087 cifs_stats_bytes_read(tcon, total_read); in cifs_read()
4739 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_oplock_break() local
4740 struct TCP_Server_Info *server = tcon->ses->server; in cifs_oplock_break()
4785 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, in cifs_oplock_break()