• Home
  • Raw
  • Download

Lines Matching refs:f

47 	struct file *f = container_of(head, struct file, f_u.fu_rcuhead);  in file_free_rcu()  local
49 put_cred(f->f_cred); in file_free_rcu()
50 kmem_cache_free(filp_cachep, f); in file_free_rcu()
53 static inline void file_free(struct file *f) in file_free() argument
55 security_file_free(f); in file_free()
56 if (!(f->f_mode & FMODE_NOACCOUNT)) in file_free()
58 call_rcu(&f->f_u.fu_rcuhead, file_free_rcu); in file_free()
98 struct file *f; in __alloc_file() local
101 f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL); in __alloc_file()
102 if (unlikely(!f)) in __alloc_file()
105 f->f_cred = get_cred(cred); in __alloc_file()
106 error = security_file_alloc(f); in __alloc_file()
108 file_free_rcu(&f->f_u.fu_rcuhead); in __alloc_file()
112 atomic_long_set(&f->f_count, 1); in __alloc_file()
113 rwlock_init(&f->f_owner.lock); in __alloc_file()
114 spin_lock_init(&f->f_lock); in __alloc_file()
115 mutex_init(&f->f_pos_lock); in __alloc_file()
116 eventpoll_init_file(f); in __alloc_file()
117 f->f_flags = flags; in __alloc_file()
118 f->f_mode = OPEN_FMODE(flags); in __alloc_file()
121 return f; in __alloc_file()
137 struct file *f; in alloc_empty_file() local
151 f = __alloc_file(flags, cred); in alloc_empty_file()
152 if (!IS_ERR(f)) in alloc_empty_file()
155 return f; in alloc_empty_file()
173 struct file *f = __alloc_file(flags, cred); in alloc_empty_file_noaccount() local
175 if (!IS_ERR(f)) in alloc_empty_file_noaccount()
176 f->f_mode |= FMODE_NOACCOUNT; in alloc_empty_file_noaccount()
178 return f; in alloc_empty_file_noaccount()
245 struct file *f = alloc_file(&base->f_path, flags, fops); in alloc_file_clone() local
246 if (!IS_ERR(f)) { in alloc_file_clone()
247 path_get(&f->f_path); in alloc_file_clone()
248 f->f_mapping = base->f_mapping; in alloc_file_clone()
250 return f; in alloc_file_clone()
306 struct file *f, *t; in delayed_fput() local
308 llist_for_each_entry_safe(f, t, node, f_u.fu_llist) in delayed_fput()
309 __fput(f); in delayed_fput()