Lines Matching refs:tcon
123 struct cifs_tcon *tcon; in cifs_posix_open() local
137 tcon = tlink_tcon(tlink); in cifs_posix_open()
141 rc = CIFSPOSIXCreate(xid, tcon, posix_flags, mode, pnetfid, presp_data, in cifs_posix_open()
176 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock, in cifs_nt_open() argument
184 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
234 oparms.tcon = tcon; in cifs_nt_open()
248 if (tcon->unix_ext) in cifs_nt_open()
286 struct cifs_tcon *tcon = tlink_tcon(tlink); in cifs_new_fileinfo() local
287 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
328 spin_lock(&tcon->open_file_lock); in cifs_new_fileinfo()
336 list_add(&cfile->tlist, &tcon->openFileList); in cifs_new_fileinfo()
343 spin_unlock(&tcon->open_file_lock); in cifs_new_fileinfo()
369 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); in cifsFileInfo_put() local
370 struct TCP_Server_Info *server = tcon->ses->server; in cifsFileInfo_put()
379 spin_lock(&tcon->open_file_lock); in cifsFileInfo_put()
384 spin_unlock(&tcon->open_file_lock); in cifsFileInfo_put()
412 spin_unlock(&tcon->open_file_lock); in cifsFileInfo_put()
416 if (!tcon->need_reconnect && !cifs_file->invalidHandle) { in cifsFileInfo_put()
417 struct TCP_Server_Info *server = tcon->ses->server; in cifsFileInfo_put()
422 server->ops->close(xid, tcon, &cifs_file->fid); in cifsFileInfo_put()
459 struct cifs_tcon *tcon; in cifs_open() local
475 tcon = tlink_tcon(tlink); in cifs_open()
476 server = tcon->ses->server; in cifs_open()
500 if (!tcon->broken_posix_open && tcon->unix_ext && in cifs_open()
501 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP & in cifs_open()
502 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_open()
511 if (tcon->ses->serverNOS) in cifs_open()
513 tcon->ses->serverName, in cifs_open()
514 tcon->ses->serverNOS); in cifs_open()
515 tcon->broken_posix_open = true; in cifs_open()
534 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon, in cifs_open()
545 server->ops->close(xid, tcon, &fid); in cifs_open()
553 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) { in cifs_open()
567 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid, in cifs_open()
589 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_relock_file() local
599 if (cap_unix(tcon->ses) && in cifs_relock_file()
600 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_relock_file()
604 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_relock_file()
617 struct cifs_tcon *tcon; in cifs_reopen_file() local
638 tcon = tlink_tcon(cfile->tlink); in cifs_reopen_file()
639 server = tcon->ses->server; in cifs_reopen_file()
658 if (tcon->ses->server->oplocks) in cifs_reopen_file()
663 if (tcon->unix_ext && cap_unix(tcon->ses) && in cifs_reopen_file()
665 le64_to_cpu(tcon->fsUnixInfo.Capability))) { in cifs_reopen_file()
695 oparms.tcon = tcon; in cifs_reopen_file()
735 if (tcon->unix_ext) in cifs_reopen_file()
780 cifs_reopen_persistent_handles(struct cifs_tcon *tcon) in cifs_reopen_persistent_handles() argument
787 if (!tcon->use_persistent || !tcon->need_reopen_files) in cifs_reopen_persistent_handles()
790 tcon->need_reopen_files = false; in cifs_reopen_persistent_handles()
796 spin_lock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
797 list_for_each(tmp, &tcon->openFileList) { in cifs_reopen_persistent_handles()
804 spin_unlock(&tcon->open_file_lock); in cifs_reopen_persistent_handles()
809 tcon->need_reopen_files = true; in cifs_reopen_persistent_handles()
820 struct cifs_tcon *tcon; in cifs_closedir() local
830 tcon = tlink_tcon(cfile->tlink); in cifs_closedir()
831 server = tcon->ses->server; in cifs_closedir()
839 rc = server->ops->close_dir(xid, tcon, &cfile->fid); in cifs_closedir()
1109 struct cifs_tcon *tcon; in cifs_push_mandatory_locks() local
1119 tcon = tlink_tcon(cfile->tlink); in cifs_push_mandatory_locks()
1125 max_buf = tcon->ses->server->maxBuf; in cifs_push_mandatory_locks()
1151 stored_rc = cifs_lockv(xid, tcon, in cifs_push_mandatory_locks()
1164 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_push_mandatory_locks()
1195 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_posix_locks() local
1259 stored_rc = CIFSSMBPosixLock(xid, tcon, lck->netfid, lck->pid, in cifs_push_posix_locks()
1284 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_push_locks() local
1294 if (cap_unix(tcon->ses) && in cifs_push_locks()
1295 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_push_locks()
1299 rc = tcon->ses->server->ops->push_mand_locks(cfile); in cifs_push_locks()
1360 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_getlk() local
1361 struct TCP_Server_Info *server = tcon->ses->server; in cifs_getlk()
1375 rc = CIFSSMBPosixLock(xid, tcon, netfid, in cifs_getlk()
1453 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_unlock_range() local
1465 max_buf = tcon->ses->server->maxBuf; in cifs_unlock_range()
1510 stored_rc = cifs_lockv(xid, tcon, in cifs_unlock_range()
1534 stored_rc = cifs_lockv(xid, tcon, cfile->fid.netfid, in cifs_unlock_range()
1558 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_setlk() local
1559 struct TCP_Server_Info *server = tcon->ses->server; in cifs_setlk()
1577 rc = CIFSSMBPosixLock(xid, tcon, cfile->fid.netfid, in cifs_setlk()
1638 struct cifs_tcon *tcon; in cifs_lock() local
1652 tcon = tlink_tcon(cfile->tlink); in cifs_lock()
1655 tcon->ses->server); in cifs_lock()
1661 if (cap_unix(tcon->ses) && in cifs_lock()
1662 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_lock()
1712 struct cifs_tcon *tcon; in cifs_write() local
1724 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1725 server = tcon->ses->server; in cifs_write()
1755 io_parms.tcon = tcon; in cifs_write()
1776 cifs_stats_bytes_written(tcon, total_written); in cifs_write()
1794 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); in find_readable_file() local
1800 spin_lock(&tcon->open_file_lock); in find_readable_file()
1812 spin_unlock(&tcon->open_file_lock); in find_readable_file()
1820 spin_unlock(&tcon->open_file_lock); in find_readable_file()
1829 struct cifs_tcon *tcon; in find_writable_file() local
1845 tcon = cifs_sb_master_tcon(cifs_sb); in find_writable_file()
1851 spin_lock(&tcon->open_file_lock); in find_writable_file()
1854 spin_unlock(&tcon->open_file_lock); in find_writable_file()
1866 spin_unlock(&tcon->open_file_lock); in find_writable_file()
1885 spin_unlock(&tcon->open_file_lock); in find_writable_file()
1892 spin_lock(&tcon->open_file_lock); in find_writable_file()
1895 spin_unlock(&tcon->open_file_lock); in find_writable_file()
1899 spin_lock(&tcon->open_file_lock); in find_writable_file()
2319 struct cifs_tcon *tcon; in cifs_strict_fsync() local
2343 tcon = tlink_tcon(smbfile->tlink); in cifs_strict_fsync()
2345 server = tcon->ses->server; in cifs_strict_fsync()
2347 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_strict_fsync()
2361 struct cifs_tcon *tcon; in cifs_fsync() local
2377 tcon = tlink_tcon(smbfile->tlink); in cifs_fsync()
2379 server = tcon->ses->server; in cifs_fsync()
2381 rc = server->ops->flush(xid, tcon, &smbfile->fid); in cifs_fsync()
2628 struct cifs_tcon *tcon; in collect_uncached_write_data() local
2634 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_write_data()
2693 cifs_stats_bytes_written(tcon, ctx->total_len); in collect_uncached_write_data()
2711 struct cifs_tcon *tcon; in cifs_user_writev() local
2729 tcon = tlink_tcon(cfile->tlink); in cifs_user_writev()
2731 if (!tcon->ses->server->ops->async_writev) in cifs_user_writev()
2842 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_writev() local
2850 if (cap_unix(tcon->ses) && in cifs_strict_writev()
2851 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) in cifs_strict_writev()
3176 struct cifs_tcon *tcon; in collect_uncached_read_data() local
3180 tcon = tlink_tcon(ctx->cfile->tlink); in collect_uncached_read_data()
3254 cifs_stats_bytes_read(tcon, ctx->total_len); in collect_uncached_read_data()
3278 struct cifs_tcon *tcon; in cifs_user_readv() local
3288 tcon = tlink_tcon(cfile->tlink); in cifs_user_readv()
3290 if (!tcon->ses->server->ops->async_readv) in cifs_user_readv()
3365 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_strict_readv() local
3379 if (cap_unix(tcon->ses) && in cifs_strict_readv()
3380 (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && in cifs_strict_readv()
3390 tcon->ses->server->vals->shared_lock_type, in cifs_strict_readv()
3406 struct cifs_tcon *tcon; in cifs_read() local
3427 tcon = tlink_tcon(open_file->tlink); in cifs_read()
3428 server = tcon->ses->server; in cifs_read()
3453 if ((tcon->ses) && !(tcon->ses->capabilities & in cifs_read()
3454 tcon->ses->server->vals->cap_large_files)) { in cifs_read()
3464 io_parms.tcon = tcon; in cifs_read()
3480 cifs_stats_bytes_read(tcon, total_read); in cifs_read()
3940 struct cifs_tcon *tcon = in is_inode_writable() local
3943 spin_lock(&tcon->open_file_lock); in is_inode_writable()
3946 spin_unlock(&tcon->open_file_lock); in is_inode_writable()
3950 spin_unlock(&tcon->open_file_lock); in is_inode_writable()
4105 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); in cifs_oplock_break() local
4106 struct TCP_Server_Info *server = tcon->ses->server; in cifs_oplock_break()
4147 rc = tcon->ses->server->ops->oplock_response(tcon, &cfile->fid, in cifs_oplock_break()