Lines Matching refs:tcon

357 cifs_mark_open_files_invalid(struct cifs_tcon *tcon)  in cifs_mark_open_files_invalid()  argument
364 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
365 if (tcon->need_reconnect) in cifs_mark_open_files_invalid()
366 tcon->status = TID_NEED_RECON; in cifs_mark_open_files_invalid()
368 if (tcon->status != TID_NEED_RECON) { in cifs_mark_open_files_invalid()
369 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
372 tcon->status = TID_IN_FILES_INVALIDATE; in cifs_mark_open_files_invalid()
373 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
376 spin_lock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
377 list_for_each_safe(tmp, tmp1, &tcon->openFileList) { in cifs_mark_open_files_invalid()
382 spin_unlock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
384 invalidate_all_cached_dirs(tcon); in cifs_mark_open_files_invalid()
385 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
386 if (tcon->status == TID_IN_FILES_INVALIDATE) in cifs_mark_open_files_invalid()
387 tcon->status = TID_NEED_TCON; in cifs_mark_open_files_invalid()
388 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
475 struct cifs_tcon *tcon; in cifs_posix_open() local
489 tcon = tlink_tcon(tlink); in cifs_posix_open()
493 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
529 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
536 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
586 .tcon = tcon, in cifs_nt_open()
608 if (tcon->unix_ext) in cifs_nt_open()
616 server->ops->close(xid, tcon, fid); in cifs_nt_open()
660 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
661 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
716 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
724 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
725 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
734 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
793 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in serverclose_work() local
795 struct TCP_Server_Info *server = tcon->ses->server; in serverclose_work()
802 rc = server->ops->close_getattr(0, tcon, cifs_file); in serverclose_work()
804 rc = server->ops->close(0, tcon, &cifs_file->fid); in serverclose_work()
854 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
855 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
864 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
872 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
886 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
902 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
907 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
908 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
914 rc = server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
916 rc = server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
950 struct cifs_tcon *tcon; in cifs_open() local
973 tcon = tlink_tcon(tlink); in cifs_open()
974 server = tcon->ses->server; in cifs_open()
996 rc = cifs_get_writable_path(tcon, full_path, FIND_WR_FSUID_ONLY, &cfile); in cifs_open()
998 rc = cifs_get_readable_path(tcon, full_path, &cfile); in cifs_open()
1018 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
1019 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
1020 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
1029 if (tcon->ses->serverNOS) in cifs_open()
1031 tcon->ses->ip_addr, in cifs_open()
1032 tcon->ses->serverNOS); in cifs_open()
1033 tcon->broken_posix_open = true; in cifs_open()
1053 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, file->f_flags, &oplock, &fid, in cifs_open()
1064 server->ops->close(xid, tcon, &fid); in cifs_open()
1071 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
1085 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
1119 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
1133 if (cap_unix(tcon->ses) && in cifs_relock_file()
1134 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
1139 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
1152 struct cifs_tcon *tcon; in cifs_reopen_file() local
1174 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
1175 server = tcon->ses->server; in cifs_reopen_file()
1195 if (tcon->ses->server->oplocks) in cifs_reopen_file()
1201 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
1203 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
1244 .tcon = tcon, in cifs_reopen_file()
1296 if (tcon->posix_extensions) { in cifs_reopen_file()
1299 } else if (tcon->unix_ext) { in cifs_reopen_file()
1409 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
1414 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
1417 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
1422 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1423 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1429 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1433 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
1444 struct cifs_tcon *tcon; in cifs_closedir() local
1454 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
1455 server = tcon->ses->server; in cifs_closedir()
1463 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1737 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1747 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1753 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1783 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1796 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1829 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1895 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1920 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1934 if (cap_unix(tcon->ses) && in cifs_push_locks()
1935 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1940 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
2002 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
2003 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
2018 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
2098 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
2108 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
2157 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
2181 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
2206 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
2207 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
2226 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
2300 struct cifs_tcon *tcon; in cifs_flock() local
2313 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
2316 tcon->ses->server); in cifs_flock()
2319 if (cap_unix(tcon->ses) && in cifs_flock()
2320 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
2349 struct cifs_tcon *tcon; in cifs_lock() local
2362 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
2365 tcon->ses->server); in cifs_lock()
2369 if (cap_unix(tcon->ses) && in cifs_lock()
2370 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
2558 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2567 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2568 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_writable_path()
2572 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2580 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2585 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2591 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2599 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2600 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_readable_path()
2604 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2612 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2618 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2631 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2656 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2658 server = tcon->ses->server; in cifs_strict_fsync()
2667 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2672 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2687 struct cifs_tcon *tcon; in cifs_fsync() local
2704 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2706 server = tcon->ses->server; in cifs_fsync()
2715 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2720 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2800 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
2808 if (cap_unix(tcon->ses) && in cifs_strict_writev()
2809 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_writev()
2901 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
2933 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
2946 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3058 struct cifs_tcon *tcon; in cifs_oplock_break() local
3072 tcon = tlink_tcon(tlink); in cifs_oplock_break()
3073 server = tcon->ses->server; in cifs_oplock_break()
3129 rc = server->ops->oplock_response(tcon, persistent_fid, in cifs_oplock_break()