Lines Matching refs:open_file

46 	struct cifsFileInfo *open_file = NULL;  in cifs_mark_open_files_invalid()  local
62 open_file = list_entry(tmp, struct cifsFileInfo, tlist); in cifs_mark_open_files_invalid()
63 open_file->invalidHandle = true; in cifs_mark_open_files_invalid()
64 open_file->oplock_break_cancelled = true; in cifs_mark_open_files_invalid()
995 struct cifsFileInfo *open_file, *tmp; in cifs_reopen_persistent_handles() local
1008 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1009 if (!open_file->invalidHandle) in cifs_reopen_persistent_handles()
1011 cifsFileInfo_get(open_file); in cifs_reopen_persistent_handles()
1012 list_add_tail(&open_file->rlist, &tmp_list); in cifs_reopen_persistent_handles()
1016 list_for_each_entry_safe(open_file, tmp, &tmp_list, rlist) { in cifs_reopen_persistent_handles()
1017 if (cifs_reopen_file(open_file, false /* do not flush */)) in cifs_reopen_persistent_handles()
1019 list_del_init(&open_file->rlist); in cifs_reopen_persistent_handles()
1020 cifsFileInfo_put(open_file); in cifs_reopen_persistent_handles()
1996 cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data, in cifs_write() argument
2005 struct dentry *dentry = open_file->dentry; in cifs_write()
2012 tcon = tlink_tcon(open_file->tlink); in cifs_write()
2027 if (open_file->invalidHandle) { in cifs_write()
2032 rc = cifs_reopen_file(open_file, false); in cifs_write()
2046 rc = server->ops->sync_write(xid, &open_file->fid, in cifs_write()
2082 struct cifsFileInfo *open_file = NULL; in find_readable_file() local
2093 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in find_readable_file()
2094 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in find_readable_file()
2096 if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { in find_readable_file()
2097 if ((!open_file->invalidHandle)) { in find_readable_file()
2100 cifsFileInfo_get(open_file); in find_readable_file()
2102 return open_file; in find_readable_file()
2118 struct cifsFileInfo *open_file, *inv_file = NULL; in cifs_get_writable_file() local
2151 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in cifs_get_writable_file()
2152 if (!any_available && open_file->pid != current->tgid) in cifs_get_writable_file()
2154 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in cifs_get_writable_file()
2156 if (with_delete && !(open_file->fid.access & DELETE)) in cifs_get_writable_file()
2158 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in cifs_get_writable_file()
2159 if (!open_file->invalidHandle) { in cifs_get_writable_file()
2161 cifsFileInfo_get(open_file); in cifs_get_writable_file()
2163 *ret_file = open_file; in cifs_get_writable_file()
2167 inv_file = open_file; in cifs_get_writable_file()
2474 struct cifsFileInfo *open_file; in cifs_partialpagewrite() local
2501 &open_file); in cifs_partialpagewrite()
2503 bytes_written = cifs_write(open_file, open_file->pid, in cifs_partialpagewrite()
2505 cifsFileInfo_put(open_file); in cifs_partialpagewrite()
3237 struct cifsFileInfo *open_file, in cifs_write_from_iter() argument
3254 pid = open_file->pid; in cifs_write_from_iter()
3258 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_write_from_iter()
3266 if (open_file->invalidHandle) { in cifs_write_from_iter()
3267 rc = cifs_reopen_file(open_file, false); in cifs_write_from_iter()
3363 wdata->cfile = cifsFileInfo_get(open_file); in cifs_write_from_iter()
3975 cifs_send_async_read(loff_t offset, size_t len, struct cifsFileInfo *open_file, in cifs_send_async_read() argument
3991 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_send_async_read()
3994 pid = open_file->pid; in cifs_send_async_read()
4002 if (open_file->invalidHandle) { in cifs_send_async_read()
4003 rc = cifs_reopen_file(open_file, true); in cifs_send_async_read()
4012 server->ops->negotiate_rsize(tlink_tcon(open_file->tlink), in cifs_send_async_read()
4080 rdata->cfile = cifsFileInfo_get(open_file); in cifs_send_async_read()
4400 struct cifsFileInfo *open_file; in cifs_read() local
4416 open_file = file->private_data; in cifs_read()
4417 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4426 pid = open_file->pid; in cifs_read()
4448 if (open_file->invalidHandle) { in cifs_read()
4449 rc = cifs_reopen_file(open_file, true); in cifs_read()
4458 rc = server->ops->sync_read(xid, &open_file->fid, &io_parms, in cifs_read()
4681 struct cifsFileInfo *open_file = ractl->file->private_data; in cifs_readahead() local
4694 pid = open_file->pid; in cifs_readahead()
4699 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_readahead()
4755 if (open_file->invalidHandle) { in cifs_readahead()
4756 rc = cifs_reopen_file(open_file, true); in cifs_readahead()
4766 server->ops->negotiate_rsize(tlink_tcon(open_file->tlink), in cifs_readahead()
4803 rdata->cfile = cifsFileInfo_get(open_file); in cifs_readahead()
4917 struct cifsFileInfo *open_file; in is_inode_writable() local
4920 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in is_inode_writable()
4921 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in is_inode_writable()