Lines Matching refs:f_owner
97 struct fown_struct *f_owner; in file_f_owner_allocate() local
99 f_owner = file_f_owner(file); in file_f_owner_allocate()
100 if (f_owner) in file_f_owner_allocate()
103 f_owner = kzalloc_obj(struct fown_struct); in file_f_owner_allocate()
104 if (!f_owner) in file_f_owner_allocate()
107 rwlock_init(&f_owner->lock); in file_f_owner_allocate()
108 f_owner->file = file; in file_f_owner_allocate()
110 if (unlikely(cmpxchg(&file->f_owner, NULL, f_owner))) in file_f_owner_allocate()
111 kfree(f_owner); in file_f_owner_allocate()
118 struct fown_struct *f_owner; in file_f_owner_release() local
120 f_owner = file_f_owner(file); in file_f_owner_release()
121 if (f_owner) { in file_f_owner_release()
122 put_pid(f_owner->pid); in file_f_owner_release()
123 kfree(f_owner); in file_f_owner_release()
130 struct fown_struct *f_owner; in __f_setown() local
132 f_owner = file_f_owner(filp); in __f_setown()
133 if (WARN_ON_ONCE(!f_owner)) in __f_setown()
136 write_lock_irq(&f_owner->lock); in __f_setown()
137 if (force || !f_owner->pid) { in __f_setown()
138 put_pid(f_owner->pid); in __f_setown()
139 f_owner->pid = get_pid(pid); in __f_setown()
140 f_owner->pid_type = type; in __f_setown()
145 f_owner->uid = cred->uid; in __f_setown()
146 f_owner->euid = cred->euid; in __f_setown()
149 write_unlock_irq(&f_owner->lock); in __f_setown()
198 struct fown_struct *f_owner; in f_getown() local
200 f_owner = file_f_owner(filp); in f_getown()
201 if (!f_owner) in f_getown()
204 read_lock_irq(&f_owner->lock); in f_getown()
206 if (pid_task(f_owner->pid, f_owner->pid_type)) { in f_getown()
207 pid = pid_vnr(f_owner->pid); in f_getown()
208 if (f_owner->pid_type == PIDTYPE_PGID) in f_getown()
212 read_unlock_irq(&f_owner->lock); in f_getown()
265 struct fown_struct *f_owner; in f_getown_ex() local
268 f_owner = file_f_owner(filp); in f_getown_ex()
269 if (f_owner) { in f_getown_ex()
270 read_lock_irq(&f_owner->lock); in f_getown_ex()
272 if (pid_task(f_owner->pid, f_owner->pid_type)) in f_getown_ex()
273 owner.pid = pid_vnr(f_owner->pid); in f_getown_ex()
275 pid_type = f_owner->pid_type; in f_getown_ex()
296 if (f_owner) in f_getown_ex()
297 read_unlock_irq(&f_owner->lock); in f_getown_ex()
311 struct fown_struct *f_owner; in f_getowner_uids() local
316 f_owner = file_f_owner(filp); in f_getowner_uids()
317 if (f_owner) { in f_getowner_uids()
318 read_lock_irq(&f_owner->lock); in f_getowner_uids()
319 src[0] = from_kuid(user_ns, f_owner->uid); in f_getowner_uids()
320 src[1] = from_kuid(user_ns, f_owner->euid); in f_getowner_uids()
321 read_unlock_irq(&f_owner->lock); in f_getowner_uids()
423 struct fown_struct *f_owner; in f_owner_sig() local
436 f_owner = file_f_owner(filp); in f_owner_sig()
438 f_owner->signum = signum; in f_owner_sig()
439 else if (f_owner) in f_owner_sig()
440 ret = f_owner->signum; in f_owner_sig()