Lines Matching refs:open_file
853 struct cifsFileInfo *open_file; in cifs_reopen_persistent_handles() local
869 open_file = list_entry(tmp, struct cifsFileInfo, tlist); in cifs_reopen_persistent_handles()
870 if (!open_file->invalidHandle) in cifs_reopen_persistent_handles()
872 cifsFileInfo_get(open_file); in cifs_reopen_persistent_handles()
873 list_add_tail(&open_file->rlist, &tmp_list); in cifs_reopen_persistent_handles()
878 open_file = list_entry(tmp, struct cifsFileInfo, rlist); in cifs_reopen_persistent_handles()
879 if (cifs_reopen_file(open_file, false /* do not flush */)) in cifs_reopen_persistent_handles()
881 list_del_init(&open_file->rlist); in cifs_reopen_persistent_handles()
882 cifsFileInfo_put(open_file); in cifs_reopen_persistent_handles()
1841 cifs_write(struct cifsFileInfo *open_file, __u32 pid, const char *write_data, in cifs_write() argument
1850 struct dentry *dentry = open_file->dentry; in cifs_write()
1857 tcon = tlink_tcon(open_file->tlink); in cifs_write()
1872 if (open_file->invalidHandle) { in cifs_write()
1877 rc = cifs_reopen_file(open_file, false); in cifs_write()
1891 rc = server->ops->sync_write(xid, &open_file->fid, in cifs_write()
1925 struct cifsFileInfo *open_file = NULL; in find_readable_file() local
1936 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in find_readable_file()
1937 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in find_readable_file()
1939 if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { in find_readable_file()
1940 if (!open_file->invalidHandle) { in find_readable_file()
1943 cifsFileInfo_get(open_file); in find_readable_file()
1945 return open_file; in find_readable_file()
1961 struct cifsFileInfo *open_file, *inv_file = NULL; in cifs_get_writable_file() local
1994 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in cifs_get_writable_file()
1995 if (!any_available && open_file->pid != current->tgid) in cifs_get_writable_file()
1997 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in cifs_get_writable_file()
1999 if (with_delete && !(open_file->fid.access & DELETE)) in cifs_get_writable_file()
2001 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in cifs_get_writable_file()
2002 if (!open_file->invalidHandle) { in cifs_get_writable_file()
2004 cifsFileInfo_get(open_file); in cifs_get_writable_file()
2006 *ret_file = open_file; in cifs_get_writable_file()
2010 inv_file = open_file; in cifs_get_writable_file()
2140 struct cifsFileInfo *open_file; in cifs_partialpagewrite() local
2167 &open_file); in cifs_partialpagewrite()
2169 bytes_written = cifs_write(open_file, open_file->pid, in cifs_partialpagewrite()
2171 cifsFileInfo_put(open_file); in cifs_partialpagewrite()
2871 struct cifsFileInfo *open_file, in cifs_write_from_iter() argument
2888 pid = open_file->pid; in cifs_write_from_iter()
2892 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_write_from_iter()
2900 if (open_file->invalidHandle) { in cifs_write_from_iter()
2901 rc = cifs_reopen_file(open_file, false); in cifs_write_from_iter()
2995 wdata->cfile = cifsFileInfo_get(open_file); in cifs_write_from_iter()
3604 cifs_send_async_read(loff_t offset, size_t len, struct cifsFileInfo *open_file, in cifs_send_async_read() argument
3620 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_send_async_read()
3623 pid = open_file->pid; in cifs_send_async_read()
3631 if (open_file->invalidHandle) { in cifs_send_async_read()
3632 rc = cifs_reopen_file(open_file, true); in cifs_send_async_read()
3705 rdata->cfile = cifsFileInfo_get(open_file); in cifs_send_async_read()
4016 struct cifsFileInfo *open_file; in cifs_read() local
4032 open_file = file->private_data; in cifs_read()
4033 tcon = tlink_tcon(open_file->tlink); in cifs_read()
4042 pid = open_file->pid; in cifs_read()
4064 if (open_file->invalidHandle) { in cifs_read()
4065 rc = cifs_reopen_file(open_file, true); in cifs_read()
4074 rc = server->ops->sync_read(xid, &open_file->fid, &io_parms, in cifs_read()
4351 struct cifsFileInfo *open_file = file->private_data; in cifs_readpages() local
4373 pid = open_file->pid; in cifs_readpages()
4378 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_readpages()
4402 if (open_file->invalidHandle) { in cifs_readpages()
4403 rc = cifs_reopen_file(open_file, true); in cifs_readpages()
4449 rdata->cfile = cifsFileInfo_get(open_file); in cifs_readpages()
4575 struct cifsFileInfo *open_file; in is_inode_writable() local
4578 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in is_inode_writable()
4579 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in is_inode_writable()