Lines Matching full: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()
392 * to this tcon. 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()
838 * server. Must be called without holding tcon->open_file_lock,
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()
1012 rc = cifs_get_hardlink_path(tcon, inode, file); in cifs_open()
1023 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
1024 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
1025 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
1034 if (tcon->ses->serverNOS) in cifs_open()
1036 tcon->ses->ip_addr, in cifs_open()
1037 tcon->ses->serverNOS); in cifs_open()
1038 tcon->broken_posix_open = true; in cifs_open()
1058 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, file->f_flags, &oplock, &fid, in cifs_open()
1069 server->ops->close(xid, tcon, &fid); in cifs_open()
1076 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
1090 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
1124 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
1138 if (cap_unix(tcon->ses) && in cifs_relock_file()
1139 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
1144 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
1157 struct cifs_tcon *tcon; in cifs_reopen_file() local
1179 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
1180 server = tcon->ses->server; in cifs_reopen_file()
1200 if (tcon->ses->server->oplocks) in cifs_reopen_file()
1206 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
1208 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
1249 .tcon = tcon, in cifs_reopen_file()
1301 if (tcon->posix_extensions) { in cifs_reopen_file()
1304 } else if (tcon->unix_ext) { in cifs_reopen_file()
1414 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
1419 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
1422 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
1427 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1428 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1434 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1438 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
1449 struct cifs_tcon *tcon; in cifs_closedir() local
1459 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
1460 server = tcon->ses->server; in cifs_closedir()
1468 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1742 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1752 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1758 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1788 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1801 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1834 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1900 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1925 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1939 if (cap_unix(tcon->ses) && in cifs_push_locks()
1940 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1945 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
2007 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
2008 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
2023 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
2080 cifs_get_hardlink_path(struct cifs_tcon *tcon, struct inode *inode, in cifs_get_hardlink_path() argument
2087 spin_lock(&tcon->open_file_lock); in cifs_get_hardlink_path()
2098 spin_unlock(&tcon->open_file_lock); in cifs_get_hardlink_path()
2126 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
2136 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
2185 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
2209 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
2234 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
2235 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
2254 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
2328 struct cifs_tcon *tcon; in cifs_flock() local
2341 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
2344 tcon->ses->server); in cifs_flock()
2347 if (cap_unix(tcon->ses) && in cifs_flock()
2348 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
2377 struct cifs_tcon *tcon; in cifs_lock() local
2390 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
2393 tcon->ses->server); in cifs_lock()
2397 if (cap_unix(tcon->ses) && in cifs_lock()
2398 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
2586 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2595 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2596 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_writable_path()
2600 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2608 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2613 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2619 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2627 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2628 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_readable_path()
2632 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2640 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2646 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2659 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2684 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2686 server = tcon->ses->server; in cifs_strict_fsync()
2695 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2700 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2715 struct cifs_tcon *tcon; in cifs_fsync() local
2732 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2734 server = tcon->ses->server; in cifs_fsync()
2743 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2748 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2828 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
2836 if (cap_unix(tcon->ses) && in cifs_strict_writev()
2837 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_writev()
2929 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
2961 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
2974 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3086 struct cifs_tcon *tcon; in cifs_oplock_break() local
3100 tcon = tlink_tcon(tlink); in cifs_oplock_break()
3101 server = tcon->ses->server; in cifs_oplock_break()
3157 rc = server->ops->oplock_response(tcon, persistent_fid, in cifs_oplock_break()