Lines Matching full:tcon

355 cifs_mark_open_files_invalid(struct cifs_tcon *tcon)  in cifs_mark_open_files_invalid()  argument
362 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
363 if (tcon->need_reconnect) in cifs_mark_open_files_invalid()
364 tcon->status = TID_NEED_RECON; in cifs_mark_open_files_invalid()
366 if (tcon->status != TID_NEED_RECON) { in cifs_mark_open_files_invalid()
367 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
370 tcon->status = TID_IN_FILES_INVALIDATE; in cifs_mark_open_files_invalid()
371 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
374 spin_lock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
375 list_for_each_safe(tmp, tmp1, &tcon->openFileList) { in cifs_mark_open_files_invalid()
380 spin_unlock(&tcon->open_file_lock); in cifs_mark_open_files_invalid()
382 invalidate_all_cached_dirs(tcon); in cifs_mark_open_files_invalid()
383 spin_lock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
384 if (tcon->status == TID_IN_FILES_INVALIDATE) in cifs_mark_open_files_invalid()
385 tcon->status = TID_NEED_TCON; in cifs_mark_open_files_invalid()
386 spin_unlock(&tcon->tc_lock); in cifs_mark_open_files_invalid()
390 * to this tcon. in cifs_mark_open_files_invalid()
473 struct cifs_tcon *tcon; in cifs_posix_open() local
487 tcon = tlink_tcon(tlink); in cifs_posix_open()
491 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
527 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
534 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
584 .tcon = tcon, in cifs_nt_open()
606 if (tcon->unix_ext) in cifs_nt_open()
614 server->ops->close(xid, tcon, fid); in cifs_nt_open()
658 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
659 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
714 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
722 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
723 atomic_inc(&tcon->num_local_opens); in cifs_new_fileinfo()
732 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
791 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in serverclose_work() local
793 struct TCP_Server_Info *server = tcon->ses->server; in serverclose_work()
800 rc = server->ops->close_getattr(0, tcon, cifs_file); in serverclose_work()
802 rc = server->ops->close(0, tcon, &cifs_file->fid); in serverclose_work()
836 * server. Must be called without holding tcon->open_file_lock,
852 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in _cifsFileInfo_put() local
853 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
862 spin_lock(&tcon->open_file_lock); in _cifsFileInfo_put()
870 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
884 atomic_dec(&tcon->num_local_opens); in _cifsFileInfo_put()
900 spin_unlock(&tcon->open_file_lock); in _cifsFileInfo_put()
905 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in _cifsFileInfo_put()
906 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
912 rc = server->ops->close_getattr(xid, tcon, cifs_file); in _cifsFileInfo_put()
914 rc = server->ops->close(xid, tcon, &cifs_file->fid); in _cifsFileInfo_put()
948 struct cifs_tcon *tcon; in cifs_open() local
971 tcon = tlink_tcon(tlink); in cifs_open()
972 server = tcon->ses->server; in cifs_open()
993 rc = cifs_get_readable_path(tcon, full_path, &cfile); in cifs_open()
1012 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
1013 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
1014 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
1023 if (tcon->ses->serverNOS) in cifs_open()
1025 tcon->ses->ip_addr, in cifs_open()
1026 tcon->ses->serverNOS); in cifs_open()
1027 tcon->broken_posix_open = true; in cifs_open()
1047 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, file->f_flags, &oplock, &fid, in cifs_open()
1058 server->ops->close(xid, tcon, &fid); in cifs_open()
1065 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
1079 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
1113 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
1127 if (cap_unix(tcon->ses) && in cifs_relock_file()
1128 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
1133 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
1146 struct cifs_tcon *tcon; in cifs_reopen_file() local
1168 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
1169 server = tcon->ses->server; in cifs_reopen_file()
1189 if (tcon->ses->server->oplocks) in cifs_reopen_file()
1195 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
1197 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
1238 .tcon = tcon, in cifs_reopen_file()
1290 if (tcon->posix_extensions) { in cifs_reopen_file()
1293 } else if (tcon->unix_ext) { in cifs_reopen_file()
1403 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
1408 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
1411 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
1416 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1417 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1423 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
1427 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
1438 struct cifs_tcon *tcon; in cifs_closedir() local
1448 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
1449 server = tcon->ses->server; in cifs_closedir()
1457 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1731 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1741 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1747 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1777 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1790 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1823 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1889 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1914 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1928 if (cap_unix(tcon->ses) && in cifs_push_locks()
1929 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1934 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1996 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1997 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
2012 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
2092 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
2102 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
2151 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
2175 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
2200 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
2201 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
2220 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
2294 struct cifs_tcon *tcon; in cifs_flock() local
2307 tcon = tlink_tcon(cfile->tlink); in cifs_flock()
2310 tcon->ses->server); in cifs_flock()
2313 if (cap_unix(tcon->ses) && in cifs_flock()
2314 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_flock()
2343 struct cifs_tcon *tcon; in cifs_lock() local
2356 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
2359 tcon->ses->server); in cifs_lock()
2363 if (cap_unix(tcon->ses) && in cifs_lock()
2364 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
2552 cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_writable_path() argument
2561 spin_lock(&tcon->open_file_lock); in cifs_get_writable_path()
2562 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_writable_path()
2566 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2574 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2579 spin_unlock(&tcon->open_file_lock); in cifs_get_writable_path()
2585 cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, in cifs_get_readable_path() argument
2593 spin_lock(&tcon->open_file_lock); in cifs_get_readable_path()
2594 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in cifs_get_readable_path()
2598 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2606 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2612 spin_unlock(&tcon->open_file_lock); in cifs_get_readable_path()
2625 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2650 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2652 server = tcon->ses->server; in cifs_strict_fsync()
2661 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2666 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2681 struct cifs_tcon *tcon; in cifs_fsync() local
2698 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2700 server = tcon->ses->server; in cifs_fsync()
2709 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2714 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2794 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
2802 if (cap_unix(tcon->ses) && in cifs_strict_writev()
2803 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_writev()
2895 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
2927 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
2940 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3052 struct cifs_tcon *tcon; in cifs_oplock_break() local
3066 tcon = tlink_tcon(tlink); in cifs_oplock_break()
3067 server = tcon->ses->server; in cifs_oplock_break()
3123 rc = server->ops->oplock_response(tcon, persistent_fid, in cifs_oplock_break()