Lines Matching refs:open_file
54 struct cifsFileInfo *open_file = req->cfile; in cifs_prepare_write() local
63 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_prepare_write()
67 if (open_file->invalidHandle) { in cifs_prepare_write()
68 rc = cifs_reopen_file(open_file, false); in cifs_prepare_write()
261 struct cifsFileInfo *open_file = NULL; in cifs_init_request() local
268 open_file = file->private_data; in cifs_init_request()
270 req->cfile = cifsFileInfo_get(open_file); in cifs_init_request()
359 struct cifsFileInfo *open_file = NULL; in cifs_mark_open_files_invalid() local
378 open_file = list_entry(tmp, struct cifsFileInfo, tlist); in cifs_mark_open_files_invalid()
379 open_file->invalidHandle = true; in cifs_mark_open_files_invalid()
380 open_file->oplock_break_cancelled = true; in cifs_mark_open_files_invalid()
1411 struct cifsFileInfo *open_file, *tmp; in cifs_reopen_persistent_handles() local
1423 list_for_each_entry(open_file, &tcon->openFileList, tlist) { in cifs_reopen_persistent_handles()
1424 if (!open_file->invalidHandle) in cifs_reopen_persistent_handles()
1426 cifsFileInfo_get(open_file); in cifs_reopen_persistent_handles()
1427 list_add_tail(&open_file->rlist, &tmp_list); in cifs_reopen_persistent_handles()
1431 list_for_each_entry_safe(open_file, tmp, &tmp_list, rlist) { in cifs_reopen_persistent_handles()
1432 if (cifs_reopen_file(open_file, false /* do not flush */)) in cifs_reopen_persistent_handles()
1434 list_del_init(&open_file->rlist); in cifs_reopen_persistent_handles()
1435 cifsFileInfo_put(open_file); in cifs_reopen_persistent_handles()
2422 struct cifsFileInfo *open_file = NULL; in find_readable_file() local
2433 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in find_readable_file()
2434 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in find_readable_file()
2436 if (OPEN_FMODE(open_file->f_flags) & FMODE_READ) { in find_readable_file()
2437 if ((!open_file->invalidHandle)) { in find_readable_file()
2440 cifsFileInfo_get(open_file); in find_readable_file()
2442 return open_file; in find_readable_file()
2458 struct cifsFileInfo *open_file, *inv_file = NULL; in cifs_get_writable_file() local
2491 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in cifs_get_writable_file()
2492 if (!any_available && open_file->pid != current->tgid) in cifs_get_writable_file()
2494 if (fsuid_only && !uid_eq(open_file->uid, current_fsuid())) in cifs_get_writable_file()
2496 if (with_delete && !(open_file->fid.access & DELETE)) in cifs_get_writable_file()
2498 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in cifs_get_writable_file()
2499 if (!open_file->invalidHandle) { in cifs_get_writable_file()
2501 cifsFileInfo_get(open_file); in cifs_get_writable_file()
2503 *ret_file = open_file; in cifs_get_writable_file()
2507 inv_file = open_file; in cifs_get_writable_file()
3006 struct cifsFileInfo *open_file; in is_inode_writable() local
3009 list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { in is_inode_writable()
3010 if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { in is_inode_writable()