Lines Matching refs:open_file

54 	struct cifsFileInfo *open_file = req->cfile;  in cifs_prepare_write()  local
64 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_prepare_write()
72 if (open_file->invalidHandle) { in cifs_prepare_write()
73 rc = cifs_reopen_file(open_file, false); in cifs_prepare_write()
266 struct cifsFileInfo *open_file = NULL; in cifs_init_request() local
273 open_file = file->private_data; in cifs_init_request()
275 req->cfile = cifsFileInfo_get(open_file); in cifs_init_request()
364 struct cifsFileInfo *open_file = NULL; in cifs_mark_open_files_invalid() local
383 open_file = list_entry(tmp, struct cifsFileInfo, tlist); in cifs_mark_open_files_invalid()
384 open_file->invalidHandle = true; in cifs_mark_open_files_invalid()
385 open_file->oplock_break_cancelled = true; in cifs_mark_open_files_invalid()
1424 struct cifsFileInfo *open_file, *tmp; in cifs_reopen_persistent_handles() local
1436 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1437 if (!open_file->invalidHandle) in cifs_reopen_persistent_handles()
1439 cifsFileInfo_get(open_file); in cifs_reopen_persistent_handles()
1440 list_add_tail(&open_file->rlist, &tmp_list); in cifs_reopen_persistent_handles()
1444 list_for_each_entry_safe(open_file, tmp, &tmp_list, rlist) { in cifs_reopen_persistent_handles()
1445 if (cifs_reopen_file(open_file, false /* do not flush */)) in cifs_reopen_persistent_handles()
1447 list_del_init(&open_file->rlist); in cifs_reopen_persistent_handles()
1448 cifsFileInfo_put(open_file); in cifs_reopen_persistent_handles()
2091 struct cifsFileInfo *open_file = NULL; in cifs_get_hardlink_path() local
2098 list_for_each_entry(open_file, &cinode->openFileList, flist) { in cifs_get_hardlink_path()
2099 if (file->f_flags == open_file->f_flags) { in cifs_get_hardlink_path()
2457 struct cifsFileInfo *open_file = NULL; in find_readable_file() local
2468 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in find_readable_file()
2469 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in find_readable_file()
2471 if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { in find_readable_file()
2472 if ((!open_file->invalidHandle)) { in find_readable_file()
2475 cifsFileInfo_get(open_file); in find_readable_file()
2477 return open_file; in find_readable_file()
2493 struct cifsFileInfo *open_file, *inv_file = NULL; in cifs_get_writable_file() local
2526 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in cifs_get_writable_file()
2527 if (!any_available && open_file->pid != current->tgid) in cifs_get_writable_file()
2529 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in cifs_get_writable_file()
2531 if (with_delete && !(open_file->fid.access & DELETE)) in cifs_get_writable_file()
2533 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in cifs_get_writable_file()
2534 if (!open_file->invalidHandle) { in cifs_get_writable_file()
2536 cifsFileInfo_get(open_file); in cifs_get_writable_file()
2538 *ret_file = open_file; in cifs_get_writable_file()
2542 inv_file = open_file; in cifs_get_writable_file()
3041 struct cifsFileInfo *open_file; in is_inode_writable() local
3044 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in is_inode_writable()
3045 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in is_inode_writable()