Lines Matching full:tcon
362 cifs_mark_open_files_invalid(struct cifs_tcon *tcon) in cifs_mark_open_files_invalid() argument
369 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
370 if (tcon->need_reconnect) in cifs_mark_open_files_invalid()
371 tcon->status = TID_NEED_RECON; in cifs_mark_open_files_invalid()
373 if (tcon->status != TID_NEED_RECON) { in cifs_mark_open_files_invalid()
374 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
377 tcon->status = TID_IN_FILES_INVALIDATE; in cifs_mark_open_files_invalid()
378 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
381 spin_lock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
382 list_for_each_safe(tmp, tmp1, &tcon->openFileList) { in cifs_mark_open_files_invalid()
387 spin_unlock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
389 invalidate_all_cached_dirs(tcon); in cifs_mark_open_files_invalid()
390 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
391 if (tcon->status == TID_IN_FILES_INVALIDATE) in cifs_mark_open_files_invalid()
392 tcon->status = TID_NEED_TCON; in cifs_mark_open_files_invalid()
393 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
397 * to this tcon. in cifs_mark_open_files_invalid()
480 struct cifs_tcon *tcon; in cifs_posix_open() local
494 tcon = tlink_tcon(tlink); in cifs_posix_open()
498 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
534 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
541 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
591 .tcon = tcon, in cifs_nt_open()
613 if (tcon->unix_ext) in cifs_nt_open()
621 server->ops->close(xid, tcon, fid); in cifs_nt_open()
665 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
666 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
721 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
729 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
730 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
739 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
798 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in serverclose_work() local
800 struct TCP_Server_Info *server = tcon->ses->server; in serverclose_work()
807 rc = server->ops->close_getattr(0, tcon, cifs_file); in serverclose_work()
809 rc = server->ops->close(0, tcon, &cifs_file->fid); in serverclose_work()
843 * server. Must be called without holding tcon->open_file_lock,
859 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
860 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
869 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
877 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
891 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
907 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
912 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
913 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
919 rc = server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
921 rc = server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
955 struct cifs_tcon *tcon; in cifs_open() local
978 tcon = tlink_tcon(tlink); in cifs_open()
979 server = tcon->ses->server; in cifs_open()
1001 rc = cifs_get_writable_path(tcon, full_path, FIND_WR_FSUID_ONLY, &cfile); in cifs_open()
1003 rc = cifs_get_readable_path(tcon, full_path, &cfile); in cifs_open()
1020 rc = cifs_get_hardlink_path(tcon, inode, file); in cifs_open()
1031 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
1032 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
1033 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
1042 if (tcon->ses->serverNOS) in cifs_open()
1044 tcon->ses->ip_addr, in cifs_open()
1045 tcon->ses->serverNOS); in cifs_open()
1046 tcon->broken_posix_open = true; in cifs_open()
1066 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, file->f_flags, &oplock, &fid, in cifs_open()
1077 server->ops->close(xid, tcon, &fid); in cifs_open()
1084 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
1098 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
1132 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
1146 if (cap_unix(tcon->ses) && in cifs_relock_file()
1147 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
1152 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
1165 struct cifs_tcon *tcon; in cifs_reopen_file() local
1187 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
1188 server = tcon->ses->server; in cifs_reopen_file()
1208 if (tcon->ses->server->oplocks) in cifs_reopen_file()
1214 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
1216 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
1257 .tcon = tcon, in cifs_reopen_file()
1309 if (tcon->posix_extensions) { in cifs_reopen_file()
1312 } else if (tcon->unix_ext) { in cifs_reopen_file()
1422 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
1427 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
1430 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
1435 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1436 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1442 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1446 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
1457 struct cifs_tcon *tcon; in cifs_closedir() local
1467 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
1468 server = tcon->ses->server; in cifs_closedir()
1476 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1750 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1760 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1766 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1796 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1809 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1842 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1908 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1933 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1947 if (cap_unix(tcon->ses) && in cifs_push_locks()
1948 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1953 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
2015 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
2016 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
2031 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
2088 cifs_get_hardlink_path(struct cifs_tcon *tcon, struct inode *inode, in cifs_get_hardlink_path() argument
2095 spin_lock(&tcon->open_file_lock); in cifs_get_hardlink_path()
2106 spin_unlock(&tcon->open_file_lock); in cifs_get_hardlink_path()
2134 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
2144 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
2193 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
2217 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
2242 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
2243 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
2262 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
2336 struct cifs_tcon *tcon; in cifs_flock() local
2349 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
2352 tcon->ses->server); in cifs_flock()
2355 if (cap_unix(tcon->ses) && in cifs_flock()
2356 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
2385 struct cifs_tcon *tcon; in cifs_lock() local
2398 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
2401 tcon->ses->server); in cifs_lock()
2405 if (cap_unix(tcon->ses) && in cifs_lock()
2406 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
2593 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2602 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2603 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_writable_path()
2607 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2615 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2620 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2626 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2634 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2635 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_readable_path()
2639 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2647 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2653 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2666 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2691 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2693 server = tcon->ses->server; in cifs_strict_fsync()
2702 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2707 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2722 struct cifs_tcon *tcon; in cifs_fsync() local
2739 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2741 server = tcon->ses->server; in cifs_fsync()
2750 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2755 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2835 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
2843 if (cap_unix(tcon->ses) && in cifs_strict_writev()
2844 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_writev()
2936 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
2968 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
2981 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3094 struct cifs_tcon *tcon; in cifs_oplock_break() local
3114 tcon = tlink_tcon(tlink); in cifs_oplock_break()
3115 server = tcon->ses->server; in cifs_oplock_break()
3171 rc = server->ops->oplock_response(tcon, persistent_fid, in cifs_oplock_break()