Lines Matching refs:open_file

172 	struct cifsFileInfo *open_file = NULL;  in cifs_mark_open_files_invalid()  local
188 open_file = list_entry(tmp, struct cifsFileInfo, tlist); in cifs_mark_open_files_invalid()
189 open_file->invalidHandle = true; in cifs_mark_open_files_invalid()
190 open_file->oplock_break_cancelled = true; in cifs_mark_open_files_invalid()
1124 struct cifsFileInfo *open_file, *tmp; in cifs_reopen_persistent_handles() local
1137 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1138 if (!open_file->invalidHandle) in cifs_reopen_persistent_handles()
1140 cifsFileInfo_get(open_file); in cifs_reopen_persistent_handles()
1141 list_add_tail(&open_file->rlist, &tmp_list); in cifs_reopen_persistent_handles()
1145 list_for_each_entry_safe(open_file, tmp, &tmp_list, rlist) { in cifs_reopen_persistent_handles()
1146 if (cifs_reopen_file(open_file, false /* do not flush */)) in cifs_reopen_persistent_handles()
1148 list_del_init(&open_file->rlist); in cifs_reopen_persistent_handles()
1149 cifsFileInfo_put(open_file); in cifs_reopen_persistent_handles()
2125 cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data, in cifs_write() argument
2134 struct dentry *dentry = open_file->dentry; in cifs_write()
2141 tcon = tlink_tcon(open_file->tlink); in cifs_write()
2156 if (open_file->invalidHandle) { in cifs_write()
2161 rc = cifs_reopen_file(open_file, false); in cifs_write()
2175 rc = server->ops->sync_write(xid, &open_file->fid, in cifs_write()
2211 struct cifsFileInfo *open_file = NULL; in find_readable_file() local
2222 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in find_readable_file()
2223 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in find_readable_file()
2225 if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { in find_readable_file()
2226 if ((!open_file->invalidHandle)) { in find_readable_file()
2229 cifsFileInfo_get(open_file); in find_readable_file()
2231 return open_file; in find_readable_file()
2247 struct cifsFileInfo *open_file, *inv_file = NULL; in cifs_get_writable_file() local
2280 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in cifs_get_writable_file()
2281 if (!any_available && open_file->pid != current->tgid) in cifs_get_writable_file()
2283 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in cifs_get_writable_file()
2285 if (with_delete && !(open_file->fid.access & DELETE)) in cifs_get_writable_file()
2287 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in cifs_get_writable_file()
2288 if (!open_file->invalidHandle) { in cifs_get_writable_file()
2290 cifsFileInfo_get(open_file); in cifs_get_writable_file()
2292 *ret_file = open_file; in cifs_get_writable_file()
2296 inv_file = open_file; in cifs_get_writable_file()
2566 struct cifsFileInfo *open_file; in cifs_partialpagewrite() local
2593 &open_file); in cifs_partialpagewrite()
2595 bytes_written = cifs_write(open_file, open_file->pid, in cifs_partialpagewrite()
2597 cifsFileInfo_put(open_file); in cifs_partialpagewrite()
3371 struct cifsFileInfo *open_file, in cifs_write_from_iter() argument
3383 pid = open_file->pid; in cifs_write_from_iter()
3387 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_write_from_iter()
3405 if (open_file->invalidHandle) { in cifs_write_from_iter()
3406 rc = cifs_reopen_file(open_file, false); in cifs_write_from_iter()
3443 wdata->cfile = cifsFileInfo_get(open_file); in cifs_write_from_iter()
3909 cifs_send_async_read(loff_t fpos, size_t len, struct cifsFileInfo *open_file, in cifs_send_async_read() argument
3922 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_send_async_read()
3930 pid = open_file->pid; in cifs_send_async_read()
3935 if (open_file->invalidHandle) { in cifs_send_async_read()
3936 rc = cifs_reopen_file(open_file, true); in cifs_send_async_read()
3945 server->ops->negotiate_rsize(tlink_tcon(open_file->tlink), in cifs_send_async_read()
3973 rdata->cfile = cifsFileInfo_get(open_file); in cifs_send_async_read()
4285 struct cifsFileInfo *open_file; in cifs_read() local
4301 open_file = file->private_data; in cifs_read()
4302 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4311 pid = open_file->pid; in cifs_read()
4333 if (open_file->invalidHandle) { in cifs_read()
4334 rc = cifs_reopen_file(open_file, true); in cifs_read()
4343 rc = server->ops->sync_read(xid, &open_file->fid, &io_parms, in cifs_read()
4480 struct cifsFileInfo *open_file = ractl->file->private_data; in cifs_readahead() local
4501 pid = open_file->pid; in cifs_readahead()
4505 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_readahead()
4562 if (open_file->invalidHandle) { in cifs_readahead()
4563 rc = cifs_reopen_file(open_file, true); in cifs_readahead()
4573 server->ops->negotiate_rsize(tlink_tcon(open_file->tlink), in cifs_readahead()
4604 rdata->cfile = cifsFileInfo_get(open_file); in cifs_readahead()
4716 struct cifsFileInfo *open_file; in is_inode_writable() local
4719 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in is_inode_writable()
4720 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in is_inode_writable()